Go - Hello World

jeikerxiao發表於2018-10-18

Mac 下安裝go

1.安裝Homebrew

安裝命令

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2.使用brew安裝go

brew install go

檢視go的安裝

go version

輸出:

go version go1.11 darwin/amd64

3.HelloWorld

推薦的IDE是 GoLand

package main

import "fmt"

func main() {
	fmt.Print("Hello, world")
}