我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

我应该在go项目中使用git子模块吗?

There's a project written in go language. And it's managed using git. Should I use git submodules or just import directives to use a 3rd-party project?

For example:

// Just use import directive.
import "github.com/3rd-party/dep"

// From a submodule.
$ cd myown
$ git add submodule https://github.com/3rd-party/dep dep
$ ...
import "github.com/myown/dep"

You should use import "github.com/3rd-party/dep" and then run go get in the working directory

Just import directive. Git submodules has a bad rep.

近期文章

  • 如何避免(处理)插入操作中的死锁?
  • Golang http:多个响应.WriteHeader调用
  • 如何使用golang etcd客户端创建目录节点?
  • 使用AJAX将GAE文件上传到blobstore
  • 在Golang中解析时间
  • 在Golang中,我们可以为变量名声明一些字符串值吗?
  • Ajax请求未发送到Go Web服务器
  • Go中未定义的变量
  • 前往频道和延迟
  • 使用go-sql-driver时如何区分连接错误和其他错误
  • 将字符串转换为uint16
  • time.Sleep在VM上睡眠的时间不正确
  • 如何在golang中切掉uuid?
  • 在Go中,使用递归扫描一行中的数字
  • 如何在字符串的特定位置找到准确的字符
  • GO Lang降价应用
  • 给定相同的输入字符串,为什么这些base64编码输出不同?
  • 找不到Golang Amazon S3环境访问密钥
  • Golang:源端口与拨号响应不同时的ReadFromUDP行为
  • 字符串到Float64:单值上下文中的多值strconv.ParseFloat()

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华