這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。
安裝GO第三方庫
go help查看命令
The commands are: build compile packages and dependencies clean remove object files doc show documentation for package or symbol env print Go environment information fix run go tool fix on packages fmt run gofmt on package sources generate generate Go files by processing source get download and install packages and dependencies install compile and install packages and dependencies list list packages run compile and run Go program test test packages tool run specified go tool version print Go version vet run go tool vet on packagesUse "go help [command]" for more information about a command.Additional help topics: c calling between Go and C buildmode description of build modes filetype file types gopath GOPATH environment variable environment environment variables importpath import path syntax packages description of package lists testflag description of testing flags testfunc description of testing functionsUse "go help [topic]" for more information about that topic.
這裡使用的是go get,可以直接擷取到github的第三方庫,之後再使用go install就可以安裝第三方庫
例如以安裝gocurse為例(git路徑為https://github.com/mpatraw/gocurse.git)
go get github.com/mpatraw/gocurse
記得設定GOPATH