Go failing - expected 'package', found 'EOF'

前端 未结 10 2107
感情败类
感情败类 2021-02-02 07:33

I\'ve been having a hard time trying to execute a simple golang program in a virtual machine powered by vagrant. These are the relevant fields of my go env:

10条回答
  •  鱼传尺愫
    2021-02-02 08:18

    As said by already suggested by Nico, When you create a new project and new main.go file this error will appear when the file is not saved. Save the file (ctrl + s) and this error will disappear in both mac & windows. I faced the same issue and just got it resolved by doing ctrl+S on the main.go file.

提交回复
热议问题