1

When running from utils directory, go list -f returns nothing.

user@linux:~/go/src/bitbucket.org/utils> go list -f '{{ .Dir }}' -m github.com/grpc-ecosystem/grpc-gateway
user@linux:~/go/src/bitbucket.org/utils> go list -m github.com/grpc-ecosystem/grpc-gateway
github.com/grpc-ecosystem/grpc-gateway v1.16.0

However, running from another directory, it returns expected.

user@linux:~/go/src/proto-api> go list -f '{{ .Dir }}' -m github.com/grpc-ecosystem/grpc-gateway
/home/user/go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.16.0

It looks like -f is getting the file from go/pkg. go/pkg/mod was cleaned using go clean -x -modcache earlier for clean-slate purpose. Tried go get -u github.com/golang/protobuf/protoc-gen-go command and it did not work.

Brits
  • 14,829
  • 2
  • 18
  • 31
pepe juan
  • 11
  • 2

0 Answers0