-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
testing: expose common struct as interface #56516
Comments
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
@seankhliao This is a proposal though. I'm proposing to make an interface for the |
@Olshansk @seankhliao's message includes a link to the already-existing interface: https://pkg.go.dev/testing#TB. |
That's exactly what I needed. Sorry for not RTFM the first time @seankhliao! |
I recently found myself doing the following in one of our test suites
The cleanup function is common to all of these and is part of the
common
struct, which is embedded in each oftestingT
,testing.B
, andtesting.F
.I was wondering if
common
could potentially be exposed as an interface?I'm happy to take a first stab at the PR if this is something the library mainteras would be open to, unless there's a technical reason this shouldn't be the case. Please lmk!
The text was updated successfully, but these errors were encountered: