In the Go web server example here: http://golang.org/doc/effective_go.html#web_server
The following line of code works
var addr = flag.String(\"addr\
In Go, top-level variable assignments must be prefixed with the var keyword. Omitting the var keyword is only allowed within blocks.
var
package main var toplevel = "Hello world" // var keyword is required func F() { withinBlock := "Hello world" // var keyword is not required }