安装 azure 模块时出现以下错误。
代码:
package test
import (
"testing"
"github.com/Azure/azure-sdk-for-go/profiles/latest/cosmos-db/mgmt/documentdb"
"github.com/gruntwork-io/terratest/modules/azure"
"github.com/stretchr/testify/assert"
)
func TestTerraformAzureCosmosDBExample(t *testing.T) {
foo
boo
}
执行:
C:\foo\boo>go test -v
# foo_test
foo_test.go:6:2: no required module provides package github.com/gruntwork-io/terratest/modules/azure; to add it:
go get github.com/gruntwork-io/terratest/modules/azure
FAIL foo_test [setup failed]
错误:
C:\foo\boo>go get github.com/gruntwork-io/terratest/modules/azure
# github.com/gruntwork-io/terratest/modules/azure
C:\foo\go\pkg\mod\github.com\gruntwork-io\terratest@v0.36.5\modules\azure\keyvault.go:139:50: too many arguments in call to "github.com/Azure/azure-sdk-for-go/services/keyvault/auth".NewAuthorizerFromFile
have (string)
want ()
C:\foo\go\pkg\mod\github.com\gruntwork-io\terratest@v0.36.5\modules\azure\resourcegroup.go:78:9: cannot use &rg (type *"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-10-01/resources".Group) as type *"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources".Group in return argument
C:\foo\go\pkg\mod\github.com\gruntwork-io\terratest@v0.36.5\modules\azure\resourcegroup.go:100:18: cannot use rg.Values() (type []"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-10-01/resources".Group) as type []"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2020-06-01/resources".Group in return argument
有人可以帮助我了解消除此错误所需的更改吗?