>백엔드 개발 >Golang >Go 타사 라이브러리를 설치하는 방법

Go 타사 라이브러리를 설치하는 방법

尚
앞으로
2020-02-18 17:21:023450검색

golang에는 뛰어난 타사 라이브러리가 많이 있습니다. Go 언어 프로그래밍을 사용할 때 타사 라이브러리가 자주 사용됩니다. 다음 칼럼에서는 go 언어 튜토리얼 칼럼에서 Go 타사 라이브러리를 설치하는 방법을 소개합니다.

Go 타사 라이브러리를 설치하는 방법

go help view 명령

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 언어 지식을 알고 싶다면 PHP 중국어 웹사이트go 언어 튜토리얼 칼럼을 주목해주세요.

위 내용은 Go 타사 라이브러리를 설치하는 방법의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
이 기사는 csdn.net에서 복제됩니다. 침해가 있는 경우 admin@php.cn으로 문의하시기 바랍니다. 삭제