Go manage multiple projects how to write Gopath and use scripts to control project management paths

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

Project Organizational Structure

yishiyaonie:go liuhanlin$ pwd/Users/liuhanlin/qiniuwork/goyishiyaonie:go liuhanlin$ lsaone    public  qbox

So set the contents of Gopath to pwd:/users/liuhanlin/qiniuwork/go
Aone is a new project, public is the common Go library, and QBox is a third-party library.

The wording of the promotion

yishiyaonie:go liuhanlin$ $GOPATH-bash: /Users/liuhanlin/qiniuwork/go/public:/Users/liuhanlin/qiniuwork/go/qbox/base/qiniu:/Users/liuhanlin/qiniuwork/go/qbox/base/docs:/Users/liuhanlin/qiniuwork/go/qbox/base/com:/Users/liuhanlin/qiniuwork/go/qbox/base/biz:/Users/liuhanlin/qiniuwork/go/qbox/base/portal:/Users/liuhanlin/qiniuwork/go/qbox/base/cgo:/Users/liuhanlin/qiniuwork/go/qbox/base/mockacc:/Users/liuhanlin/qiniuwork/go/aone: No such file or directory

Use your public library as the first, so that when you go get, the public library will be installed in these places, other libraries, linked to its tail, guaranteed to be found in the Gopath.

The env.sh added to the trailer are written in the following way:

yishiyaonie:aone liuhanlin$ cat env.sh export  Gopath= $GOPATH :  $AONEROOT /aoneexport  path= $PATH : $ Aoneroot /aone/bin  
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.