golang有許多優秀的第三方函式庫,在我們使用go語言程式設計時常常會用到第三方函式庫,以下就來由go語言教學欄位來為大家介紹安裝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 packages Use "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 functions Use "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
更多go語言知識請關注php中文網go語言教學專欄。
以上是安裝go第三方函式庫的方法的詳細內容。更多資訊請關注PHP中文網其他相關文章!