In Go,top-level variable assignmentsmustbe prefixed with thevar
keyword. Omitting thevar
keyword is only allowed within blocks.
package main var toplevel = "Hello world" // var keyword is required func F() { withinBlock := "Hello world" // var keyword is not required }