by marketer · 16y ago · 0 comments
func main()
{
println("hello world")
}
Instead, if you run gofmt -w on the above code, you get this: func main() { println("hello world!") }
This compiles fine, but it looks ugly. func main()
{
is read as: func main();
{
due to the new semicolon-inserting lexer rules. If you use the gofmt style, you won't notice this breaking change.I can compile (with 6g) the hello world example from golang.org with any brace indentation style.
Or you can read the relevant mailing list thread:
http://groups.google.com/group/golang-nuts/browse_thread/thr...