Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skipping test defined methods, or add -exclude flat #39

Open
Liooo opened this issue May 24, 2023 · 0 comments
Open

skipping test defined methods, or add -exclude flat #39

Liooo opened this issue May 24, 2023 · 0 comments

Comments

@Liooo
Copy link

Liooo commented May 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant