Software Engineering :: Programming :: Languages :: GoLang :: Your First Go Program
⪼ Made with 💜 by Polyglot.
% mkdir -p /tmp/starter
% cd !$
% mkdir src
% asdf plugin add golang
% asdf install golang latest
% asdf global golang latest
% mkdir -p src/$USER/hello
% go mod init wilmoore.com/hello
% cat > src/$USER/hello/hello.go <<EOF
package main
import "fmt"
func main() {
fmt.Printf("Hello, world.\n")
}
EOF
% GOPATH=$PWD go install ./src/$USER/hello
% ./bin/hello
#=> Hello, world.