News for hackers. Stuff that matters.
Re:gofumpt: It's like gofmt except more strict by mvdan on Saturday February 11, 2023 @11:06AM (#34753523)
I hadn't really considered that people might want to do this. From experience reading and writing Go code for ~8 years at multiple companies, the only times I've seen leading or trailing empty lines in blocks have always been either inconsistent or unintentional, and usually both.

Are there Go codebases that stick to the formatting you show, out of curiosity?

Either way, please file a bug. Perhaps others can chime in there if they also use the same style.

Re:gofumpt: It's like gofmt except more strict by mixedCase on Saturday February 11, 2023 @11:58AM (#34754025)
I've seen this once across many Go codebases, it was someone who even a year in writing Go still refused to consistently name constants and global variables without snake_case, among other similar behaviors.

Support for allowing configuration of such a thing would be a misfeature if I was to be asked.

Re:gofumpt: It's like gofmt except more strict by mvdan on Saturday February 11, 2023 @12:22PM (#34754238)
gofumpt will never have formatting knobs, following gofmt's design. But if one of gofumpt's rules forbids a style which is reasonable even if it's not very popular, we might want to make the rule more conservative or remove it entirely.
Re:gofumpt: It's like gofmt except more strict by preseinger on Saturday February 11, 2023 @12:29PM (#34754305)
man you can't let snake_case pass code review