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
cmd/gofmt: gofmt -r can't parse 'var a SomeType -> var a AnotherType' #4430
Labels
Comments
a related issue: https://golang.org/issue/4406 gofmt's -r options use go/parser.ParseExpr to parse the input, so only expression is allowed in a rewrite. |
Owner changed to @griesemer. |
The gofmt rewrite mechanism is nice but also a historical artifact. At this point it makes more sense to have a more general and separate rewrite tool instead. Making this specific feature work in gofmt will only prompt other rewrite notations that are also not accepted. Decided to not take any action and leave this to a future, more sophisticated tool. Status changed to Unfortunate. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: