0

I am trying to call GetVM from azure-sdk-for-go-samples/compute and when I am trying to build project it is showing the below error

 use of internal package github.com/Azure-Samples/azure-sdk-for-go-samples/internal/config not allowed
test.go:17:2: use of internal package github.com/Azure-Samples/azure-sdk-for-go-samples/internal/iam not allowed

I am using Go version : 1.14.3

Note: I am cloning the repo in $GOPATH/src/githhub.com directory .

  • The error message is 100% clear and spot on: "use of internal package [...] not allowed". There is nothing more to know here. – Volker May 24 '20 at 15:11
  • But this is external package still showing this kind of error. [https://github.com/Azure-Samples/azure-sdk-for-go-samples] I also have search for same errors. @Volker – Hetal Sonavane May 25 '20 at 02:14
  • github.com/Azure-Samples/azure-sdk-for-go-samples is **not** a package so it cannot show this error message. If you need help you must provide much more information in much greater detail. – Volker May 25 '20 at 05:03

1 Answers1

1

internal packages are specifically marked as not for use outside of that program or package, and therefore cannot be imported. See: https://golang.org/doc/go1.4#internalpackages

Sam Smith
  • 31
  • 2