When I run the following code with the command "go.exe run main.go", the program doesnt print text to the screen or exit.
package main
import "fmt"
func main(){
fmt.Println("Hello world")
}
go.exe version = go version go.1.5.1 windows/amd64
set GOARCH=386
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\project
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_386
set GO15VENDOREXPERIMENT=
set CC=gcc
set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
Any ideas what's wrong?
Thanks
EDIT:
I tried uninstalling the windows/amd64 version and installing windows/386 to no avail. It's installed in c:\Go and the PATH is set. I'm using windows 10.
Line feeds
package mainLF
LF
import "fmt"LF
LF
func main(){LF
fmt.Println("Hello world")LF
}LF
The following doesn't print to the command prompt either.
package main
//import "fmt"
func main(){
println("Hello world")
}
The following gives the error "fmt imported but not used" so it must be doing something.
package main
import "fmt"
func main(){
}
GOROOT is set to C:\Go\
PATH: C:\Go\bin
Image showing how I'm running the program
EDIT: New Image