When using interfacer on github.com/go-git/go-git/v5.Worktree it failed inconsistently with:
no exported methods found for "Worktree" (package "github.com/go-git/go-git/v5_test")
I tried to debug interfacer and found out that it loads the definitions from this package in a random order and there are four definitions in this package with the name Worktree, two of those definitions have the type *types.Named so they pass this check, but only one of them has the type methods, which makes if fail if it takes the wrong definition.
I have implemented a fix and it seems to be working, I can submit a PR if you'd like.
When using interfacer on
github.com/go-git/go-git/v5.Worktree
it failed inconsistently with:I tried to debug
interfacer
and found out that it loads the definitions from this package in a random order and there are four definitions in this package with the nameWorktree
, two of those definitions have the type*types.Named
so they pass this check, but only one of them has the type methods, which makes if fail if it takes the wrong definition.I have implemented a fix and it seems to be working, I can submit a PR if you'd like.