Here is the Go test program:
package main
import fmt "fmt"
func main () {
ex := "moo cow\n";
fmt.Print (ex)
}
With a semicolon, it compiles. However, if the semicolon is removed, this does not mean:
string.go: 5: syntax error near fmt
Any ideas?
Update (March 2012) . Newer releases of Go can compile both forms (with and without semicolons).
user181548
source
share