Golang expected package found eof

main.go:4:5:
/usr/local/go/src/fmt/doc.go:1:1: expected 'package', found 'EOF'
package runtime:
/usr/local/go/src/runtime/alg.go:1:1: expected 'package', found 'EOF'

Using VS Code for GO, and faced the same issue. Saving the file ‘Ctrl+S’ on Windows fixed the issue.

Reference : Answered by Nico