Why does Golang enforce curly bracket to not be on the next line?
问题 correct: if(true) { } incorrect: if(true) { } Why is this style enforced, does it have something to do with the language spec, or is it just because they prefer one style over another ? 回答1: Why are there braces but no semicolons? And why can't I put the opening brace on the next line? Go uses brace brackets for statement grouping, a syntax familiar to programmers who have worked with any language in the C family. Semicolons, however, are for parsers, not for people, and we wanted to