go-to-protobuf: use full path for go_package

This commit is contained in:
John Howard 2021-11-23 09:39:48 -08:00
parent 469c4c4a30
commit 1723bb1f79

View File

@ -47,7 +47,7 @@ type genProtoIDL struct {
func (g *genProtoIDL) PackageVars(c *generator.Context) []string {
if g.omitGogo {
return []string{
fmt.Sprintf("option go_package = %q;", g.localGoPackage.Name),
fmt.Sprintf("option go_package = %q;", g.localGoPackage.Package),
}
}
return []string{
@ -60,7 +60,7 @@ func (g *genProtoIDL) PackageVars(c *generator.Context) []string {
"option (gogoproto.goproto_unrecognized_all) = false;",
"option (gogoproto.goproto_enum_prefix_all) = false;",
"option (gogoproto.goproto_getters_all) = false;",
fmt.Sprintf("option go_package = %q;", g.localGoPackage.Name),
fmt.Sprintf("option go_package = %q;", g.localGoPackage.Package),
}
}
func (g *genProtoIDL) Filename() string { return g.OptionalName + ".proto" }