当我运行以下命令时:
go get github.com/docker/go-plugins-helpers/volume
它打印:
github.com/docker/go-connections/sockets
../github.com/docker/go-connections/sockets/sockets.go:35:26: dialer.DialContext undefined (type proxy.Dialer has no field or method DialContext)
../github.com/docker/go-connections/sockets/sockets_unix.go:24:28: undefined: context
答案 0 :(得分:0)
您正在使用proxy.Dialer,而您似乎想要net.Dialer,因为该用户有一个DialContext
。
答案 1 :(得分:0)
对于那些不熟悉go的人(例如我),一个非常临时的解决方法(直到有https://github.com/docker/go-connections/issues/60的修复程序)将是:
cd ~/go/src/github.com/docker/go-connections
git checkout 9885905e989f4d8cc9f42d3549c5be9c27e4460d
go get github.com/docker/go-connections/sockets
cd -
欢呼