安装go第三方库的方法


本文摘自php中文网,作者尚,侵删。

golang有许多优秀的第三方库,在我们使用go语言编程时经常会用到第三方库,下面就来由go语言教程栏目来为大家介绍一下安装go第三方库的方法。

go help查看命令

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

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就可以安装第三方库

阅读剩余部分

相关阅读 >>

Golang 获取当前外网ip/地址/运营商

Go-zero 如何扛住流量冲击(二)

10 Golang map的正确使用姿势

Golang menu

ssh连接服务器后执行多条命令

Go语言闭包谈函数式编程

Go操作redis

Go封装、继承、多态

快看!Go-carbon 1.2.2 版本发布了!新增了时间设置和时间差比较功能

Golang 三种指针类型具体类型的指针、unsafe.pointer、uintptr作用

更多相关阅读请进入《Go》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...