I'm trying to generate an interface for a struct in an external library, but they define additional methods in test file, and I don't want the generated interface to have those.
e.g.
// --- external.go ---
package external
type TheirStruct struct{}
// we want this
func (t TheirStruct) SomeMethod() {
}
// --- external_test.go ---
package external
// but we do not want this
func (t TheirStruct) SomeTestMethod() {
}
Would be great if this tool automatically skips test file defined methods, or have an -exclude flag that takes names of methods to be skipped.
I'm trying to generate an interface for a struct in an external library, but they define additional methods in test file, and I don't want the generated interface to have those.
e.g.
Would be great if this tool automatically skips test file defined methods, or have an -exclude flag that takes names of methods to be skipped.