I'm trying to follow the instructions here to create python classes from a protobuf defanition found here.
When I run:
protoc -I=. --python_out=target cortex.proto
I'm stuck with an error:
cortex.proto:7:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.
It's clear to me that I also need to clone a dependency. I did this manually with git clone https://github.com/gogo/protobuf but was then stuck with a dependency of the dependency.
I believe what I need to do is to use go to pull the full set of dependencies for me. I tried go get but this results with the dependencies being cloned with names such as ~/go/pkg/mod/github.com/gogo/protobuf@v1.3.2 (including the tag). And protoc still can't find them as a result.
I think I'm missing something simple about how go works. I've not spent much time with go so my suspicion is that I've simply not found the correct command to pull the dependencies in a way that protobuf will accept.
How do you compile protobuf files from a go project (using go dependencies)?