About the difference between Gopath and Goroot

Source: Internet
Author: User

Recently in the study of using GODEP to manage Golang dependency packages, the following issues were encountered:

The project has dependencies on other packages that you edit, and the dependency package is in the same directory as the main package, so you can only generate a dependency package that you want to github.com when you execute GODEP save.


After analysis found: I usually put my own package into the goroot, so go compiler will think that I am editing the package is the System package, and then will not put my edited package into the Godep.json, my own editor of the package into the GOPATH/SRC can be.


Language is not particularly fluent, only as a record of their own, there are problems to find me to discuss

This article is from the "Linux related" blog, so be sure to keep this source http://diadia.blog.51cto.com/5440926/1774454

About the difference between Gopath and Goroot

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.