I think this is little weird, why does this code does not work?
package main
import "fmt"
func main() {
var i, j int = 1, 2
k := 3
c, python, go := true, false, false
fmt.Println(i, j, k, c, python, go)
}
Throws error
# command-line-arguments
.\compile64.go:8:13: syntax error: unexpected go, expecting expression
.\compile64.go:10:29: syntax error: unexpected go, expecting expression
But this worked!
package main
import "fmt"
func main() {
var i, j int = 1, 2
k := 3
c, python, goo := true, false, false
fmt.Println(i, j, k, c, python, goo)
}
Is "go" a reserved word in Golang?