golang / tour

[mirror] A Tour of Go
BSD 3-Clause "New" or "Revised" License
1.53k stars 521 forks source link

tour: Tweak reader.go code example #1604

Open manjeet-bhachu-rft opened 3 months ago

manjeet-bhachu-rft commented 3 months ago

Context: https://go.dev/tour/methods/21

Suggest changing line 16 from:

fmt.Printf("b[:n] = %q\n", b[:n])

to:

fmt.Printf("b[:%v] = %q\n", n, b[:n])