go command:
go build: compile and create new program
go run: compile and execute it
go fmt: format all go code
go install: compile and install a package
go get: download the raw source code of other package
go test: run any tests in the project
Package list: golang.org/pkg
go func(): 开启一个子协程执行该匿名函数内的逻辑。
chan:
<- 表示从chan里读取或者发送数据
Go语言编程指南:从基础到实战
本文介绍了Go语言的基本命令,如gofmt格式化代码、gobuild编译与执行、gotest测试项目,以及关键包如golang.org/pkg的使用。深入讲解了子协程gofunc()和channel操作,适合初学者快速上手。
150

被折叠的 条评论
为什么被折叠?



