Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow... I don't understand diving into a language like this without reading about or looking at other source code already written in the language. This is not a bug! Golang enforces certain formatting, it is very opinionated and the authors are very upfront about that. http://golang.org/doc/effective_go.html#formatting

Also, you can use the `gofmt` tool (when running Go on your local machine) to help you learn what Go prefers if you don't want to read all of the excellent documentation on the site. [EDIT: I see you already know about this tool but I'll leave this comment here for others]



Exactly, this is not a bug and this won't be fixed. Go adds a ";" at the end of lines like "func main()", which in this case means "func main(){" has a different meaning than "func main()".


Oh god....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: