加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

golang意外的目录布局

发布时间:2020-12-16 09:24:53 所属栏目:大数据 来源:网络整理
导读:所以我从 github.com/minio/minio下载了minio 我想从源代码运行它, 我创建我的目录,如: ~/Downloads/minio-RELEASE.2017-06-13T19-01-01Z| src | all minio directories,including vendor,like the image below 我还使用godep解决GOPATH下的其他依赖项. 现
所以我从 github.com/minio/minio下载了minio

我想从源代码运行它,

我创建我的目录,如:

~/Downloads/minio-RELEASE.2017-06-13T19-01-01Z
|
 src
   |
    all minio directories,including vendor,like the image below

enter image description here

我还使用godep解决GOPATH下的其他依赖项.

现在我从Gogland运行它(去IDE)

表明:

GOROOT=/usr/local/Cellar/go/1.8.3/libexec
GOPATH=/Users/xl/Downloads/minio-RELEASE.2017-06-13T19-01-01Z:/Users/xl/go
/usr/local/Cellar/go/1.8.3/libexec/bin/go build -i -o /private/var/folders/8v/6dg7d6mx2850sv1gp8ts9thm0000gn/T/go_run_main_gogo /Users/xl/Downloads/minio-RELEASE.2017-06-13T19-01-01Z/src/main.go
unexpected directory layout:
    import path: github.com/Azure/azure-sdk-for-go/storage
    root: /Users/xl/Downloads/minio-RELEASE.2017-06-13T19-01-01Z/src
    dir: /Users/xl/Downloads/minio-RELEASE.2017-06-13T19-01-01Z/src/vendor/github.com/Azure/azure-sdk-for-go/storage
    expand root: /Users/xl/Downloads/minio-RELEASE.2017-06-13T19-01-01Z/src
    expand dir: /Users/xl/Downloads/minio-RELEASE.2017-06-13T19-01-01Z/src/vendor/github.com/Azure/azure-sdk-for-go/storage
    separator: /

现在我很困惑,问题是什么?文件都在那里,目录就像它的打印一样.我如何解决它?谢谢.

解决方法

见 GitHub code layout

$GOPATH is the root of the project – each of your Github repos will be checked out several folders below $GOPATH.
Your $GOPATH variable will point to the root of your Go workspace,as described in 07001.

在你的情况下,你应该有你的GOPATH文件夹下面

src/github.com/minio/minio

Anf然后只有“所有minio目录,包括供应商”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读