x/tools/cmd/stringer: support generating types defined in test files #66557
Labels
help wanted
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Go version
go version devel go1.23-5e1e3a0025 Thu Mar 21 17:25:54 2024 +0000 linux/amd64
What did you do?
Run this testscript script:
What did you see happen?
What did you expect to see?
I'd expect it to succeed and generate a file named
foo_string_test.go
containing aString
method for the typefoo
.It's sometimes useful to have the convenience of
stringer
to generate a String method even if the type is only defined for a test.The text was updated successfully, but these errors were encountered: