Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (23 sloc) 603 Bytes
package go_koans
import "bytes"
func aboutCommonInterfaces() {
{
in := new(bytes.Buffer)
in.WriteString("hello world")
out := new(bytes.Buffer)
/*
Your code goes here.
Hint, use these resources:
$ godoc -http=:8080
$ open http://localhost:8080/pkg/io/
$ open http://localhost:8080/pkg/bytes/
*/
assert(out.String() == "hello world") // get data from the io.Reader to the io.Writer
}
{
in := new(bytes.Buffer)
in.WriteString("hello world")
out := new(bytes.Buffer)
assert(out.String() == "hello") // duplicate only a portion of the io.Reader
}
}
Jump to Line
Something went wrong with that request. Please try again.