Re:GCC 6: -Wmisleading-indentation vs. “goto fail;”
by MereInterest on Friday February 26, 2016 @12:36PM
(#11182704)
I thought that the go compiler would throw an error of your code is not in the format produced by gofmt. You don't need to use the tool, but you need to have your code in the same format that the tool would produce.
[ Parent
| on HN ]
Re:GCC 6: -Wmisleading-indentation vs. “goto fail;”
by neilc on Friday February 26, 2016 @12:42PM
(#11182730)
> I thought that the go compiler would throw an error of your code is not in the format produced by gofmt.
This is not the case.
Re:GCC 6: -Wmisleading-indentation vs. “goto fail;”
by infogulch on Friday February 26, 2016 @04:21PM
(#11184338)
Nope. The gofmt-contract is a purely social one. But it's one held by nearly the entire go community which probably gave you that impression for good reason.
Re:GCC 6: -Wmisleading-indentation vs. “goto fail;”
by MereInterest on Friday February 26, 2016 @06:39PM
(#11185152)
Wow, true. The first thing that I read was how to set up emacs to run gofmt every time you save a src file. After that, I never questioned it.