Either a bug or confusing documentation in Go: airport robot

From the readme:

func (s Stats) Add(v int) {
    s.value += v
}

func (s Stats) Value() int {
    return s.value
}

func (s Stats) SomeOtherMethod() {
    // The type can have additional methods not mentioned in the interface.
}

For implementing the interface, it does not matter whether the method has a value or pointer receiver.
(Revisit the [methods concepts][concept-methods] if you are unsure about those.)

However, while it may not matter whether the method is call by value or reference, the functionality depends on it being correct, and the example inadvertently shows why. Add() won’t actually do anything because it’s passed a copy which doesn’t escape the function. I don’t know what this example is intended to convey.

The problem was reported on Discord here: Discord

They will not use Discourse (personal choice… ). No github account disclosed.