go_playground/1-hello-world
2021-12-30 20:34:36 +01:00
..
go.mod hello world project 2021-12-30 20:34:36 +01:00
hello hello world project 2021-12-30 20:34:36 +01:00
hello.go hello world project 2021-12-30 20:34:36 +01:00
readme.md hello world project 2021-12-30 20:34:36 +01:00

Hello World

Steps to reproduce

mkdir 1-hello-world
cd 1-hello-world
go mod init example/user/hello
cat go.mod
# first statement in a Go source file must be package name. Executable commands must always use package main. 

# to run
go run hello.go

# to build and run binary
go build
./hello

# to install binary to system
go install example/user/hello
# or
go install