mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-26 21:24:22 +00:00
cmd/protoc-gen-go: add protoc suffix
Change-Id: Ib09bd3cbd15088d534de34b08d01a4d7a4880c0a Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/306209 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Damien Neil <dneil@google.com> Trust: Joe Tsai <thebrokentoaster@gmail.com> Trust: Damien Neil <dneil@google.com>
This commit is contained in:
parent
e4fcb9f7e7
commit
fc9592f7ac
@ -128,6 +128,9 @@ func genGeneratedHeader(gen *protogen.Plugin, g *protogen.GeneratedFile, f *file
|
||||
protocVersion := "(unknown)"
|
||||
if v := gen.Request.GetCompilerVersion(); v != nil {
|
||||
protocVersion = fmt.Sprintf("v%v.%v.%v", v.GetMajor(), v.GetMinor(), v.GetPatch())
|
||||
if s := v.GetSuffix(); s != "" {
|
||||
protocVersion += "-" + s
|
||||
}
|
||||
}
|
||||
g.P("// \tprotoc-gen-go ", protocGenGoVersion)
|
||||
g.P("// \tprotoc ", protocVersion)
|
||||
|
Loading…
Reference in New Issue
Block a user