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

阅读剩余部分

相关阅读 >>

Go modules使用详解

kube-apiserver内存溢出问题调查及Go tool pprof工具的使用

[系列] Go - 学习 grpc.dial(target string, opts …dialoption) 的写法

聊聊dubbo-Go-proxy的zookeeperregistryload

Go接口interface的用法介绍

Golang获取调用者的方法名及所在源码行数

Golang to docker

手撸Golang 结构型设计模式 装饰器模式

25 Goroutine channel实现并发和并行(二)

GoGolang之间有区别吗?

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




打赏

取消

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

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

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

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

评论

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