How to install go third-party libraries

Release: 2020-02-18 17:21:02
forward
3287 people have browsed it

golang has many excellent third-party libraries. When we use go language programming, we often use third-party libraries. Next, the go language tutorial column will introduce to you how to install go third-party libraries. library methods.

How to install go third-party libraries

go help view command

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.
Copy after login

Go get is used here, which can directly obtain the third-party library of github, and then use go install Install third-party libraries

For example, take the installation of gocurse as an example (git path is https://github.com/mpatraw/gocurse.git)

go get github.com/mpatraw/gocurse
Copy after login

For more go language knowledge, please pay attention to php Chinese Netgo language tutorial column.

The above is the detailed content of How to install go third-party libraries. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
go
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!