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
As an extension to -trimprefix=str, this flag would automatically detect the longest common prefix in all the generated constant names and trim it.
A possible alternative would be using a special value in -trimprefix instead, such as a character that cannot be part of a Go identifier. -trimprefix=-, -trimprefix=. and -trimprefix=^ have been suggested.
Branching off #16539, since that issue was primarily about the now implemented -trimprefix.
The text was updated successfully, but these errors were encountered:
I don't think this is necessary. String is run by go generate so one only types the prefix once. Also, since we're generating program text, it's good to be precise rather than implicit.
Fair enough, your reasoning makes sense. I have to admit I went along with the suggestion in the original proposal without giving it much thought myself. Thankfully, I did not spend much time on the CL.
As an extension to
-trimprefix=str
, this flag would automatically detect the longest common prefix in all the generated constant names and trim it.A possible alternative would be using a special value in
-trimprefix
instead, such as a character that cannot be part of a Go identifier.-trimprefix=-
,-trimprefix=.
and-trimprefix=^
have been suggested.Branching off #16539, since that issue was primarily about the now implemented
-trimprefix
.The text was updated successfully, but these errors were encountered: