golang:安装go第三方库的方法

 所属分类:php教程

 浏览:80次-  评论: 0次-  更新时间:2022-09-30
描述:更多教程资料进入php教程获得。 golang有许多优秀的第三方库,在我们使用go语言编程时经常会用到第三方库,下面就来由go语言教程栏目来为大...
更多教程资料进入php教程获得。 golang有许多优秀的第三方库,在我们使用go语言编程时经常会用到第三方库,下面就来由go语言教程栏目来为大家介绍一下安装go第三方库的方法。

php入门到就业线上直播课:进入学习
API 文档、设计、调试、自动化测试一体化协作工具:点击使用

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语言知识请关注zzsucai.comgo语言教程栏目。

以上就是安装go第三方库的方法的详细内容,更多请关注zzsucai.com其它相关文章!

 标签: go,
积分说明:注册即送10金币,每日签到可获得更多金币,成为VIP会员可免金币下载! 充值积分充值会员更多说明»

讨论这个素材(0)回答他人问题或分享使用心得奖励金币

〒_〒 居然一个评论都没有……

表情  文明上网,理性发言!