[英]How to set go module path of private repository
我想將我的 go 模塊路徑設置為example.com/myrepo
而不是github.com/myusername/myrepo
以便我能夠在另一個存儲庫中導入。
例如,如果我的 go.mod 看起來像這樣
module example.com/myrepo
go 1.13
我將如何讓go get example.com/myrepo
工作?
我在go get example.com/myrepo
上得到以下信息
unrecognized import path "example.com/myrepo" (parse https://example.com/myrepo?go-get=1: no go-import meta tags ())
鑒於我是example.com
的所有者,我該怎么做?
它被稱為虛榮導入路徑。
In addition to the common hosting sites (GitHub, Bitbucket, etc) and custom VCS URLs (.git, .hg, etc) known to the go command, this mechanism can be used to point a custom URL to any of the services.
你一定在找這個https://sagikazarmark.hu/blog/vanity-import-paths-in-go/ 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.