wand/internal/tests/tmpdir/wtqcAdcxZGXt7vrbvOkxAw/wtqcAdcxZGXt7vrbvOkxAw.go

19 lines
312 B
Go
Raw Normal View History

2025-12-30 16:52:10 +01:00
package main
import "io"
import "code.squareroundforest.org/arpio/wand"
func main() {
wand.Exec(func(in io.Reader) (out io.Reader) {
buf := make([]byte, 1)
for {
n, err := in.Read(buf)
if n == 1 {
buf[0] = buf[0] * 2
out.Write(buf)
}
if err != nil {
return
}
}
})
}