0

I am trying to add reflection to my working Go-based gRPC. I am getting an error when I try to fetch the reflection package:

$ GO111MODULE=on go get google.golang.org/grpc/reflection
go: github.com/google/go-github@v0.0.0-20190119011113-56cb1dd99043: go.mod has post-v0 module path "github.com/google/go-github/v21" at revision 56cb1dd99043
go: error loading module requirements

I can't find any reference to "go-github/v21" anywhere in my source, or in any of the packages in my GOPATH.

I also can't figure out what this error message means.

I am using Go version go1.11.5.

Thanks.

Martin Del Vecchio
  • 3,558
  • 2
  • 27
  • 36
  • You've described what the problem is. If you want to use modules you need to import the package by the correct path, which in this case would be `github.com/google/go-github/v21`, which you said isn't in any of your source. – JimB Jan 10 '20 at 15:51
  • I am not importing the go-github package anywhere. I assume it is a dependency of one of the gRPC packages, but I can't figure out which. I also don't want to use modules; I appear to be forced to use modules, as omitting the GO111MODULE=on option results in multiple build failures. Thanks. – Martin Del Vecchio Jan 10 '20 at 15:59
  • Well `google.golang.org/grpc/reflection` does not require `github.com/google/go-github`. You need to figure what is importing that incorrectly, and handle that dependency first. I would also suggest upgrading to the current supported release of Go, which has some fixes and improvements for modules. – JimB Jan 10 '20 at 16:43

0 Answers0