Skip to content

Commit 3be7f8e

Browse files
Updated example.
1 parent 3341d8d commit 3be7f8e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎chapter7/listing34/listing34.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
// main is the entry point for the application.
1212
func main() {
1313
// Create a Buffer value and write a string to the buffer.
14-
// Using the io.Writer implementation for Buffer.
14+
// Using the Write method that implements io.Writer.
1515
var b bytes.Buffer
1616
b.Write([]byte("Hello "))
1717

18-
// Use Fprintf to write the string to the Buffer.
19-
// Using the io.Writer implementation for Buffer.
18+
// Use Fprintf to concatenate a string to the Buffer.
19+
// Passing the address of a bytes.Buffer value for io.Writer.
2020
fmt.Fprintf(&b, "World!")
2121

2222
// Write the content of the Buffer to the stdout device.
23-
// Using the io.Writer implementation for os.File.
23+
// Passing the address of a os.File value for io.Writer.
2424
b.WriteTo(os.Stdout)
2525
}

0 commit comments

Comments
 (0)