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
:
For me, this also happened using Atom + Go Plus + Terminal Plus. The problem was that leading bracket was not on the "correct" line.
NOTE: Go Plus warns about syntax upon save, but I had imported this file after creating it locally with VIM, so I was never presented with the lint errors...
Error:
package main
import "fmt"
func main()
{
fmt.Println("hello world")
}
Correct:
package main
import "fmt"
func main() {
fmt.Println("hello world")
}