-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/gofmt: indenting of multi-line argument list is confusing #48064
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
Comments
I don't know the logic of gofmt. This might be the same issue as #48065. Sorry to double submit if this is the case. |
I think we always indent a tab if the second line is the same statement following the first line. So this is working as intended. cc @griesemer to confirm. Thanks. |
What @cherrymui said. |
I would think the goal of gofmt is to produce easily readable code. As shown by my example "always indent a tab if the second line is the same statement following the first line" is clearly not a great rule. I didn't want to submit this as a bug. I searched for ways to submit improvements, but couldn't find anything. So I submitted it here as an issue. In most other projects, github issues are also used to discuss new feature/improvements. But seeing how quickly this get closed, I must have been wrong. So how do I submit a request for an improvement to gofmt? |
proposals are also filed as issues, but given how large of a change this would be for negligible gain it is unlikely to ever be accepted |
What version of Go are you using (
go version
)?What did you do?
I pass this file to gofmt:
What did you see?
Notice how the argument list blends into the function's code.
What did you expect?
I can think of two options:
The text was updated successfully, but these errors were encountered: