安装go第三方库

偏执的太偏执、 2022-09-23 03:49 562阅读 0赞

安装GO第三方库

go help查看命令

  1. The commands are:
  2. build compile packages and dependencies
  3. clean remove object files
  4. doc show documentation for package or symbol
  5. env print Go environment information
  6. fix run go tool fix on packages
  7. fmt run gofmt on package sources
  8. generate generate Go files by processing source
  9. get download and install packages and dependencies
  10. install compile and install packages and dependencies
  11. list list packages
  12. run compile and run Go program
  13. test test packages
  14. tool run specified go tool
  15. version print Go version
  16. vet run go tool vet on packages
  17. Use "go help [command]" for more information about a command.
  18. Additional help topics:
  19. c calling between Go and C
  20. buildmode description of build modes
  21. filetype file types
  22. gopath GOPATH environment variable
  23. environment environment variables
  24. importpath import path syntax
  25. packages description of package lists
  26. testflag description of testing flags
  27. testfunc description of testing functions
  28. Use "go help [topic]" for more information about that topic.

这里使用的是go get,可以直接获取到github的第三方库,之后再使用go install就可以安装第三方库

例如以安装gocurse为例(git路径为https://github.com/mpatraw/gocurse.git)

  1. go get github.com/mpatraw/gocurse

记得设置GOPATH

发表评论

表情:
评论列表 (有 0 条评论,562人围观)

还没有评论,来说两句吧...

相关阅读