我很难在 go 中更换模块。
我试图清理缓存,go get <PackageName>
明确告诉编译器更改模块路径等。
replace github.com/terraform-providers/terraform-provider-aws => github.com/hashicorp/terraform-provider-aws v1.2.3
我在网上挖掘,但我看到的解决方案都没有帮助我。
GOROOT=C:\Program Files\Go #gosetup
GOPATH=C:\Users\omer\go #gosetup
"C:\Program Files\Go\bin\go.exe" mod tidy #gosetup
go: finding module for package github.com/hashicorp/terraform-provider-aws
go: finding module for package github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource
go: finding module for package github.com/hashicorp/terraform-plugin-sdk/v2/terraform
go: finding module for package github.com/hashicorp/terraform-plugin-sdk/v2/diag
go: finding module for package golang.org/x/crypto/ssh
go: finding module for package github.com/hashicorp/go-multierror
go: finding module for package github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema
go: finding module for package github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation
go: found github.com/hashicorp/go-multierror in github.com/hashicorp/go-multierror v1.1.1
go: found github.com/hashicorp/terraform-plugin-sdk/v2/diag in github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
go: found github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema in github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
go: found github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation in github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
go: found github.com/ravendb/ravendb-go-client in github.com/ravendb/ravendb-go-client v0.0.0-00010101000000-000000000000
go: found github.com/ravendb/ravendb-go-client/serverwide/operations in github.com/ravendb/ravendb-go-client v0.0.0-00010101000000-000000000000
go: found github.com/ravendb/terraform-provider-ravendb/utils in github.com/ravendb/terraform-provider-ravendb v0.0.0-00010101000000-000000000000
go: found golang.org/x/crypto/ssh in golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
go: found github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource in github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
go: found github.com/hashicorp/terraform-plugin-sdk/v2/terraform in github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
go: found github.com/hashicorp/terraform-provider-aws in github.com/hashicorp/terraform-provider-aws v1.60.0
go: terraform-provider-ravendb/ravendb tested by
terraform-provider-ravendb/ravendb.test imports
github.com/hashicorp/terraform-provider-aws: github.com/hashicorp/terraform-provider-aws@v1.60.0: parsing go.mod:
module declares its path as: github.com/terraform-providers/terraform-provider-aws
but was required as: github.com/hashicorp/terraform-provider-aws