You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to being able go from a type to a string, it would be useful to parse a string back into a type value.
I propose adding a new -scanner option that would tell the stringer tool to also generate a fmt.Scanner implementation that accepts the "%s" verb. It makes sense to include this as part of x/tools/cmd/stringer because the implmentation can make use of the generated _Type_name and _Type_index array.
I have an implementation that I have used in a private project, and I would like to contribute it back to the Go project. This proposal would provide a solution for the earlier request #60228.
The text was updated successfully, but these errors were encountered:
Proposal Details
In addition to being able go from a type to a
string
, it would be useful to parse astring
back into a type value.I propose adding a new
-scanner
option that would tell the stringer tool to also generate afmt.Scanner
implementation that accepts the"%s"
verb. It makes sense to include this as part of x/tools/cmd/stringer because the implmentation can make use of the generated_Type_name
and_Type_index
array.An example of use:
I have an implementation that I have used in a private project, and I would like to contribute it back to the Go project. This proposal would provide a solution for the earlier request #60228.
The text was updated successfully, but these errors were encountered: