dlin,
The Go language documentation gives you sage advice.
Learning Go
"If you're new to Go, we recommend you work through the tutorial. The
language specification has all the details should you want to
explore."
"Once you've learned a little about the language, Effective Go will
help you learn the style and idioms of programming in Go."
Documentation - The Go Programming Language
http://golang.org/doc/docs.html
In your particular case: "String addition creates a new string by
concatenating the operands." Therefore, you can write:
http://golang.org/doc/go_spec.html#Arithmetic_operators
fmt.Fprintln(os.Stderr, "usage: gonetgrep [flags] <key> url
[url...]" +
"\nGrep keyword in multiple web pages."
)
Don't write it this way with the plus sign on the second line:
fmt.Fprintln(os.Stderr, "usage: gonetgrep [flags] <key> url
[url...]"
+ "\nGrep keyword in multiple web pages."
)
This will fail because of the semicolon rule: “if the newline comes
after a token that could end a statement, add a semicolon”.
http://golang.org/doc/effective_go.html#semicolons
Peter