Skip to content

sample code doc error in Effective Go #452

@dougfelt

Description

@dougfelt
This is perhaps the most trivial issue imaginable, but...

At http://golang.org/doc/effective_go.html#parallel

the sample code has an incorrect comment:

// Apply the operation to n elements of v starting at i.
func (v Vector) DoSome(i, n int, u Vector, c chan int) {
    for ; i < n; i++ {
...

n is not a count of elements, it is a limit.  The calling code in the following 
example is ok, it is the commenton this func that's in error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions