Monday, June 20, 2016

VS Code Go error: package main: burger.go:1:1: expected 'package', found 'EOF'

If you get the following Go compiler error, chances are that you haven't saved your .go file before compilation.

package main:
burger.go:1:1: expected 'package', found 'EOF'

Just hit Cmd+S before running the code, otherwise the Go compiler will try to compile a file that could be empty.

No comments:

Post a Comment