Create a file hello_world.go
:
https://codeeval.dev/gist/5648d36550f7592236327e920243f791 main.go
Run it with go run hello_world.go
.
go run
is useful for ad-hoc execution of single-file program.
You can also create an executable with go build hello_world.go
.
On Windows this will create .\\hello_world.exe
executable.
On every other OS this will create ./hello_world
executable.