1, create new folder "project" for Golang execise code
$ mkdir ~/project
2, create go file
$ touch hello.go
3, edit go file, add following lines in file "hello.go"
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello Golang !")
}
4, run go file
$ go run hello.go
5, the output should be like: Hello Golang !