-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Description
I've got a one-line function which is slightly longer than the ones surrounding it and gofmt decides to break it up into three lines. I thought Go is not supposed to have a line length limit and I have written longer lines (not one-line functions) than this in the past which gofmt left as-is. http://play.golang.org/p/1HPUqQ4wWc WANT: func (a abcdefghijkl) Less(i, j int) bool { return a.abcde[i].abcdefghijklm < a.abcde[j].abcdefghijklm } func (a abcdefghijklm) Less(i, j int) bool { return a.abcde[i].abcdefghijklm < a.abcde[j].abcdefghijklm } func (a abcdefghijklmn) Less(i, j int) bool { return a.abcde[i].abcdefghijklm < a.abcde[j].abcdefghijklm } GOT: func (a abcdefghijkl) Less(i, j int) bool { return a.abcde[i].abcdefghijklm < a.abcde[j].abcdefghijklm } func (a abcdefghijklm) Less(i, j int) bool { return a.abcde[i].abcdefghijklm < a.abcde[j].abcdefghijklm } func (a abcdefghijklmn) Less(i, j int) bool { return a.abcde[i].abcdefghijklm < a.abcde[j].abcdefghijklm }