I have two proto src file, in same folder, let's say:
the 1st one is foo.proto
syntax = "proto3";
package foo;
the second is bar.proto
, which need import foo.proto
syntax = "proto3";
import "foo.proto";
package bar;
you can see they have different package name, when I use protoc to generate them one by one, (foo.proto as the 1st of cause), I have two golang file generated, but I have to put them into 2 directory (you can't put different package name file inside same directory, golang )
foo/foo.pb.go
bar/bar.pb.go
but inside bar.pb.go
the import are using local import path, which is like
import foo "."
I'm tweeking several options which protoc provided, but didn't make this work, any suggestion?
I believe add option go_package
should be the correct solution