No pit installation using GODEP (Go language third-party dependency management)

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Installing GODEP

The official installation documentation is used go get github.com/tools/godep , unfortunately, because the "network" issue will report an error that cannot be found golang.org/x/tools/go/vcs .

and https://github.com/golang/tools  is an image of Golang.org/x/tools, the code is the same, so I installed the following.

    • go get github.com/golang/tools

    • gopath\src\github.com The directory is tools folder.

    • src and github.com peer new x folder is built, and then Code style= "" >tools all copied in.

    • then go get github.com/ TOOLS/GODEP .

    • at this time GODEP installed in your gopath\bin The directory.

Using GODEP

Build a demo project to demonstrate GODEP.

  • The path to this demo project is added to the Gopath

  • Depending on the project and the project itself should be a git repository

    • git init git Add. Git commit

    • cd skeleton\src\xx.org\dep

      git initgit add .   git commit   
  • Project directory and Code

    • In the skeleton\src\wiselyman.org\app directory, execute godep save , the Godeps folder is generated at this time

    • Then you can remove xx.org the directory.

    • Continue using will use the following command

 GODEP go run main.gogodep go buildgodep go installgodep go test  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.