go build may fail on macOS and Ubuntu
drew-russell opened this issue · 2 comments
drew-russell commented
What happened:
When running go build -o terraform-provider-rubrik
the follow error message may show
./main.go:10:15: cannot use "github.com/rubrikinc/rubrik-provider-for-terraform/rubrikcdm".Provider (type func() "github.com/rubrikinc/rubrik-provider-for-terraform/vendor/github.com/hashicorp/terraform/terraform".ResourceProvider) as type "github.com/hashicorp/terraform/plugin".ProviderFunc in field value
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Environment:
macOS
and Ubuntu
drew-russell commented
The issue is probably related to the repo folder not being in the $GOPATH. @vDingus can you try on your machine again and see if that's the case?
drew-russell commented
Issue confirmed due to GOPATH issues