-
-
Notifications
You must be signed in to change notification settings - Fork 402
Closed
Labels
Description
Hi, I have a question.
Is this a false positive?
Static checker warns unused function.
$ golangci-lint run
foo/example.go:15:16: func `(*Buzz).bar` is unused (unused)
func (b *Buzz) bar() {This private function is used through interface.
package main
import "./foo"
func main() {
foo.Bar(&foo.Buzz{})
}package foo
import "fmt"
type Foo interface {
bar()
}
func Bar(f Foo) {
f.bar()
}
type Buzz struct{}
func (b *Buzz) bar() {
fmt.Println("foo bar buzz")
}This problem happens with [email protected], not with [email protected].