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

前端 未结 10 2110
感情败类
感情败类 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条回答
  •  闹比i
    闹比i (楼主)
    2021-02-02 08:18

    As a new go user I came upon this answer looking for someone to tell me that I need to start my scripts with package main although my error was a little different,

    ... expected 'package', found 'import'

    It's real obvious now, but hey, that's how it goes.

提交回复
热议问题