Answer the question
In order to leave comments, you need to log in
How to fix main.go:1:16: expected ';', found 'import' error?
[email protected] ~/golang/src/golang-book/chapter2 [21:55:15]
> $ go run main.go
main.go:1:16: expected ';', found 'import'
[email protected] ~/golang/src/golang-book/chapter2 [21:55:22]
> $ go version
go version go1.2.1 linux/amd64
[email protected] ~/golang/src/golang-book/chapter2 [21:55:25]
> $ which go
/usr/bin/go
[email protected] ~/golang/src/golang-book/chapter2 [21:55:30]
> $ ls -la /usr/bin/go
lrwxrwxrwx 1 root root 20 апр. 13 21:47 /usr/bin/go -> /etc/alternatives/go
package main
import "fmt"
func main() {
fmt.Println("ok")
}
Answer the question
In order to leave comments, you need to log in
main.go:1:16: expected ';', found 'import'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question