Improve imports support (imports lookup)

* Add `--single-package-mode option`
    * Add `getMessageType` helper
    * Add `getProtoFile` helper
    * Add `examples/single-package-mode` example
This commit is contained in:
Manfred Touron
2017-05-18 19:44:05 +02:00
parent 5448f25fd6
commit 4e25b6e83a
11 changed files with 480 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
syntax = "proto3";
package the.bbb.package;
option go_package = "github.com/moul/protoc-gen-gotemplate/examples/single-package-mode/output/bbb";
import "aaa/aaa.proto";
service BbbService {
rpc Aaa(the.aaa.package.AaaRequest) returns (the.aaa.package.AaaReply);
rpc Bbb(BbbRequest) returns (BbbReply);
}
message BbbRequest {
bool enable = 1;
}
message BbbReply {
bool done = 1;
}