use helper to detect import paths

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-02-23 23:54:53 +03:00
parent 8d4aac8b8b
commit 6b8fa89a69
6 changed files with 176 additions and 131 deletions

2
rpc.go
View File

@@ -14,7 +14,7 @@ func (g *Generator) rpcGenerate(component string, plugin *protogen.Plugin) error
}
gname := file.GeneratedFilenamePrefix + "_micro_" + component + ".pb.go"
gfile := plugin.NewGeneratedFile(gname, ".")
gfile := plugin.NewGeneratedFile(gname, file.GoImportPath)
gfile.P("// Code generated by protoc-gen-micro")
gfile.P("// source: ", *file.Proto.Name)