Go

From 太極
Jump to navigation Jump to search

The Go Programming Language

How to Write Go Code

Go by Example: Hello World

$ cat hello-world.go
package main
import "fmt"
func main() {
    fmt.Println("hello world")
}

$ go run hello-world.go
hello world
$ go build hello-world.go
$ ./hello-world 
hello world