- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleBuffer_reader (0.12 sec)
-
src/bytes/example_test.go
) func ExampleBuffer() { var b bytes.Buffer // A Buffer needs no initialization. b.Write([]byte("Hello ")) fmt.Fprintf(&b, "world!") b.WriteTo(os.Stdout) // Output: Hello world! } func ExampleBuffer_reader() { // A Buffer can turn a string or a []byte into an io.Reader. buf := bytes.NewBufferString("R29waGVycyBydWxlIQ==") dec := base64.NewDecoder(base64.StdEncoding, buf) io.Copy(os.Stdout, dec)
Registered: Tue Oct 29 11:13:09 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0)