git - 在自定义 GO 包之上提交

标签 git go github

我在 fork 的 go 项目中使用 sha3 包。我正在使用该包中不存在的特殊功能,我必须从 gist 下载一个文件,将其插入到 sha3 包中并编译它。
一切正常。但是,任何想要运行我的代码的人都必须先获取该文件并将其插入标准 sha3 包中,安装该包并运行我的项目。 将 gist 文件和 sha3 包含到我的提交中以便任何人都可以克隆并运行它的最佳方式是什么?这是文件路径:

workspace-
         |_src__
                |_github.com
                |          |_myproject
                |                     |_codes
                |                     |_.git
                |_golang.org
                           |_x
                             |_crypto
                                    |_sha3
                                         |_custom.go

最佳答案

看看dep :

  • 删除 golang.org 文件夹,然后转到项目文件夹。
  • 然后尝试dep Ensure

如果您没有安装 go dep,请先输入:

go get -u github.com/golang/dep/cmd/dep

这将提供您的依赖项:请参阅“Understanding and using the vendor folder ”。

关于git - 在自定义 GO 包之上提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48633765/

相关文章:

c++ - 如何应对开发流失

random - 使用 crypto/rand 通过 rand.Perm 生成排列

Android Studio 推送到 Github

git - 在 Github 中恢复到以前的版本,仅在 Github 中编辑

git - 使用 Git Bash 在 Windows 上存储 GitHub 凭据

git - 如何在 vim 中并排查看多个 git diff

git - Perforce 分支与 git 分支

network-programming - golang 提供 htonl/htons 吗?

reflection - 将界面转换为其相关 map

git - 孤儿分支的 pull 请求