基础知识
基础
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
golang github : github.com/golang/go
安装
https://golang.org/doc/install
➜ ~ go version
go version go1.16.2 darwin/amd64
配置
-
GOROOT
-
GOPATH
golang 工作目录
~/go-workspace
|
| - bin
|
| - pkg
|
| - src
|
| - github.com
|
| - my-account [github 账户]
|
| - morningcat2018
|
| - my-project [工程名称]
|
| - studygo
hello world
/**
* main.go
*/
package main
import "fmt"
func main() {
fmt.Println("hello world")
}