2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-01 21:40:24 +00:00
cheat.sheets/sheets/_go/hello

18 lines
369 B
Plaintext
Raw Normal View History

2017-05-28 21:17:32 +00:00
// file: hello.go
2017-05-28 21:32:04 +00:00
// to install go:
// download go from https://golang.org/dl/
// extract it somewhere (say to $HOME/go1.X)
// export GOROOT=$HOME/go1.X
// export PATH=$PATH:$GOROOT/bin
// to compile: go build hello.go
// to run: go run hello.go
// or ./hello
2017-05-28 21:17:32 +00:00
package main
import "fmt"
func main() {
fmt.Println("Hello Go")
}