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:
go env
In my case i was solve the problem by Using "VS Code" instead of default "text editor"
The problem was some extra characters present in the file. Once we remove extra characters it will work.
I wish it will solve to you also.