The documentation has the primary goal of explaining how things work, not being the canonical style guide.
Take a similar example from the Go documentation:
const NCPU = 4 // number of CPU cores
func (v Vector) DoAll(u Vector) {
c := make(chan int, NCPU) // Buffering optional but sensible.
for i := 0; i < NCPU; i++ {
go v.DoSome(i*len(v)/NCPU, (i+1)*len(v)/NCPU, u, c)
}
// Drain the channel.
for i := 0; i < NCPU; i++ {
<-c // wait for one task to complete
}
// All done.
}
The documentation has the primary goal of explaining how things work, not being the canonical style guide.
Take a similar example from the Go documentation: