Go 获取有关依赖项来自何处的注册表信息
我想从私人golang注册表中获取我的依赖项 使用Go 获取有关依赖项来自何处的注册表信息,go,goproxy,Go,Goproxy,我想从私人golang注册表中获取我的依赖项 使用GOPROXY 我希望确保所有依赖项都来自该私有注册表 我现在唯一能找到的方法就是 go get -v -t github.com/opentracing/opentracing-go@fakeversion 哪个会回来 go get: github.com/opentracing/opentracing-go@fakeversion: invalid version: reading http://myprivateregistry.co
GOPROXY
我希望确保所有依赖项都来自该私有注册表
我现在唯一能找到的方法就是
go get -v -t github.com/opentracing/opentracing-go@fakeversion
哪个会回来
go get: github.com/opentracing/opentracing-go@fakeversion: invalid version: reading http://myprivateregistry.com 404 Not found
如果不这样做,我如何获取它从中获取的注册表?您可以使用
go-get-v-x
跟踪go-get
(可以省略-v
),并检查请求是否符合您的期望:
$ go get -v -x
# get https://myinternalproxy.com/github.com/@v/list
# get https://myinternalproxy.com/github.com/gin-gonic/gin/@v/list
# get https://myinternalproxy.com/github.com/gin-gonic/@v/list
# get https://myinternalproxy.com/github.com/stretchr/testify/require/@v/list
# get https://myinternalproxy.com/github.com/stretchr/testify/assert/@v/list
# get https://myinternalproxy.com/github.com/stretchr/testify/@v/list
# get https://myinternalproxy.com/github.com/stretchr/@v/list
# get https://myinternalproxy.com/github.com/stretchr/@v/list: 410 Gone (0.462s)
# get https://myinternalproxy.com/github.com/gin-gonic/@v/list: 410 Gone (0.466s)
# get https://myinternalproxy.com/github.com/@v/list: 410 Gone (0.466s)
... much more logs
谢谢你,这正是我想要的。