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/go: align comments in go.mod files #28513
Comments
Personally, I'm not a big fan of alignment like that. it messes up diffs - what would be a single-line addition or removal of a dependency becomes a change to every line with a Also, hopefully, we'll see many less |
It is appear to be acceptable. |
As @rogpeppe notes, (It's true that alignment add spurious diffs, but arguably |
go-resty is imported under its old import path by grpc-gateway. This works around that problem until we pick up a version of grpc-gateway that has the imports fixed. See: golang/go#28513
FWIW: This does not only affect modules or "indirect" comments but in general all kinds of enumeration: Before:
(first comment aligned by one space; second line indented by 1 tab and aligned by 7 spaces) After:
(second line indented by 2 tabs; no alignment) Now that's just two lines, but every other year one might have to handle a dozen+. Lack of alignment really hurts here. Struct tags do get alignment, so apparently someone had the same idea. |
@Zsar that sounds like it should be a separate issue; the syntax and formatting of |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Go 1.11
Does this issue reproduce with the latest release?
yes
What did you do?
go mod init
go mod tidy
What did you expect to see?
Into go.mod, is it possible to have (like into comment into source code) align of
// indirect
What did you see instead?
The text was updated successfully, but these errors were encountered: