Skip to content

Hello World

https://gobyexample-cn.github.io/hello-world

go
package main

import "fmt"

func main() {
    fmt.Println("hello world")
}

运行

sh
go run hello-world.go

编译

sh
go build hello-world.go

默认的 build 只会得到当前环境的。