donglong2856
2017-01-11 17:20
浏览 181
已采纳

golang在src文件夹之外下载了软件包

When i install package like this:

go get github.com/go-zoo/bone

it's create a folder in src folder like this:

src/github.com/go-zoo/bone

I want to keep src folder only for my own code.

图片转代码服务由CSDN问答提供 功能建议

当我这样安装软件包时:

 去获取github  .com / go-zoo / bone 
   
 
 

在src文件夹中创建一个文件夹,如下所示:

  src  /github.com/go-zoo/bone
  
 
 

我只想为自己的代码保留src文件夹。

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dream543211 2017-01-13 21:13
    已采纳

    The solution of my problem, is to create a vendor folder in your project directory,like so:

    src:
      - vendor:
        - packages...
    

    its like an npm or any package manager.

    there also tools like: govend and trash.

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题