docker-protobuf icon indicating copy to clipboard operation
docker-protobuf copied to clipboard

go_out=out_dir prepends path

Open ae-ou opened this issue 5 years ago • 0 comments

The Go module that I'm working on is at: github.com/ae-ou/my-project/. My proto files are in the api subdirectory (following the Go suggested practices), so the path to one proto file is github.com/ae-ou/my-project/api/myfile.proto.

If I run the command docker run --rm -v $(pwd):$(pwd) -w $(pwd) znly/protoc --go_out=$(pwd) -I. myfile.proto (this follows your readme, but changes python_out to go_out) from within the api subdirectory, the the resultant myfile.pb.go file gets output to github.com/ae-ou/my-project/api/github.com/ae-ou/my-project/api/myfile.pb.go - it prepends the output path with the path of the go module.

ae-ou avatar May 19 '20 22:05 ae-ou