我在尝试编译GO代码时遇到了这个错误
[root@scsor0014444001 Netapp]# go build -o terraform-provider-xxxx
# github.com/hashicorp/terraform/config
../go/src/github.com/hashicorp/terraform/config/testing.go:9: t.Helper undefined (type *testing.T has no field or method Helper)
[root@scsor0014444001 Netapp]# go version
go version go1.8.3 linux/amd64有没有人能帮我理解这里出了什么问题?
提前感谢!
发布于 2017-09-01 06:42:28
从0.10.3版本开始,由于使用了新的“测试助手”功能,Terraform核心现在需要Go 1.9。
由于提供程序依赖于核心系统中的一些包作为库,不幸的是,这种依赖关系也会被提供程序继承。如果您正在使用供应商提供Terraform核心(推荐!)然后,您可以潜在地将提供的版本回滚到the final commit before this change,以便使用1.8进行构建,尽管随着时间的推移,这种策略当然会导致提供的包落后于最新的更改。
升级到1.9应该会以一种更持久的方式解决这个问题。
https://stackoverflow.com/questions/45957208
复制相似问题