[英]golang error in getting a package
While trying to download the package in golang in my project using this command I go this error 在尝试使用此命令在我的项目中的golang中下载软件包时,出现此错误
/home$ go get golang.org/x/oauth2/google / home $ go获取golang.org/x/oauth2/google
prashant/.go/src/google.golang.org/cloud/compute/metadata/metadata.go:55: unknown net.Dialer field 'KeepAlive' in struct literal prashant / .go / src / google.golang.org / cloud / compute / metadata / metadata.go:55:结构文字中未知的net.Dialer字段“ KeepAlive”
Tried searching on google and have updated my golang version as well. 尝试在Google上搜索,并更新了我的golang版本。 but the error is still coming.
但是错误仍然存在。 OS: Ubuntu 14.04
操作系统:Ubuntu 14.04
Any suggestions? 有什么建议么?
You probably don't have the newest go. 您可能没有最新消息。 Try
尝试
go version
去版本
In go 1.5.1 that I have net.Dialer has also member KeepAlive. 在go 1.5.1中,我有net.Dialer也有成员KeepAlive。 In your version probably don't.
在您的版本中可能没有。 You can check
你可以检查一下
go doc net.Dialer
转到doc net.Dialer
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.