Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upcmd/gofmt: remove -tabs and -tabwidth flags #7101
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Labels changed: added repo-main. Owner changed to @griesemer. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
gopherbot
commented
Jan 10, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
cespare
Jan 10, 2014
Contributor
I have a patch at https://golang.org/cl/50600043. I'll mail if we reach consensus. Please count my star as support.
I have a patch at https://golang.org/cl/50600043. I'll mail if we reach consensus. Please count my star as support. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
gopherbot
commented
Jan 11, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
kisielk
Jan 11, 2014
Contributor
I'm +1 for the change. The purpose of gofmt is to put code in to the canonical Go style, which is indented with tabs. There's no reason to provide options to put it in to another style, it just serves to confuse new users. If someone wants to format Go code in to their own style, they can easily create their own tool by forking the gofmt code.
I'm +1 for the change. The purpose of gofmt is to put code in to the canonical Go style, which is indented with tabs. There's no reason to provide options to put it in to another style, it just serves to confuse new users. If someone wants to format Go code in to their own style, they can easily create their own tool by forking the gofmt code. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
gopherbot
commented
Jan 11, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
dominikh
Jan 11, 2014
Member
Having the options suggests, to new users, that using them is fine and that they're still following Go style even though they're not. Not having them is more likely to get new people to adopt the correct style. The select few who are stubborn enough to ignore the style are free to go through the hassle of using their own fork of gofmt.
Having the options suggests, to new users, that using them is fine and that they're still following Go style even though they're not. Not having them is more likely to get new people to adopt the correct style. The select few who are stubborn enough to ignore the style are free to go through the hassle of using their own fork of gofmt. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
gopherbot
Jan 11, 2014
Yes, because gofmt is adopted and perceived by the community as a requirement. Most people won't contribute to projects that are not gofmt'ed properly. Go programmers *love* the fact that gofmt is the defacto standard and they follow it. Usually, people that are doing something different are new to the language and too attached to their other language's standards.
gopherbot
commented
Jan 11, 2014
Yes, because gofmt is adopted and perceived by the community as a requirement. Most people won't contribute to projects that are not gofmt'ed properly. Go programmers *love* the fact that gofmt is the defacto standard and they follow it. Usually, people that are doing something different are new to the language and too attached to their other language's standards. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
minux
Jan 11, 2014
Member
they probably won't change their mind just because this change. but I sincerely hope they change their mind at least for Go (and I know people who did) as I said in the mailing discussion, Go is a language optimized for read rather than write, and having consistent formatting is just one aspect of it.
they probably won't change their mind just because this change. but I sincerely hope they change their mind at least for Go (and I know people who did) as I said in the mailing discussion, Go is a language optimized for read rather than write, and having consistent formatting is just one aspect of it. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
cespare
Jan 11, 2014
Contributor
@Dave (comment #6) If you're referring to the go/format package, that currently only provides functionality for the canonical style (with tabs). You'd have to reimplement gofmt using other go/* packages and turn TabIndent off in go/printer. Looking at the tests for that package, it appears that it actually does not use TabIndent for the test cases.
@Dave (comment #6) If you're referring to the go/format package, that currently only provides functionality for the canonical style (with tabs). You'd have to reimplement gofmt using other go/* packages and turn TabIndent off in go/printer. Looking at the tests for that package, it appears that it actually does not use TabIndent for the test cases. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
This issue was closed by revision 014f3dc. Status changed to Fixed. |
bradfitz
added
fixed
labels
Jan 14, 2014
bradfitz
assigned
griesemer
Jan 14, 2014
golang
locked and limited conversation to collaborators
Dec 8, 2014
rsc
added this to the Go1.3 milestone
Apr 14, 2015
rsc
removed
the
release-go1.3maybe
label
Apr 14, 2015
gopherbot
added
the
FrozenDueToAge
label
Jun 25, 2016
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
bradfitz commentedJan 10, 2014