This repository was archived by the owner on May 9, 2021. It is now read-only.

Description
In the following example, golint does not require a comment on foo.Bar(). This decision is implemented at https://github.com/golang/lint/blob/master/lint.go#L819-L821. I think golint should require a comment, either for all "exported" methods of unexported types, or for methods of unexported types which constitute an exported interface, or for each method indicated in an exported interface definition (i.e. under type Foo interface).
package test
// Foo -- this comment is required by golint
type Foo interface {
Bar()
}
type foo struct {
}
// Bar -- this comment is *not* required by golint
func (f *foo) Bar() {
}
// NewFoo -- this comment is required by golint
func NewFoo() Foo {
return &foo{}
}