cmd/protoc-gen-go: remove go version from header
The Go toolchain version isn't particularly interesting; short of bugs
in the toolchain, the protoc-gen-go output should be identical for any
version of the compiler and stdlib. Including it introduces pointless
variance in generated output when switching between compiler versions.
Change-Id: I74a709cf227ecf68dd62579947e03c07349f04de
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/193122
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
diff --git a/cmd/protoc-gen-go/internal_gengo/main.go b/cmd/protoc-gen-go/internal_gengo/main.go
index 2eb33aa..12eeb36 100644
--- a/cmd/protoc-gen-go/internal_gengo/main.go
+++ b/cmd/protoc-gen-go/internal_gengo/main.go
@@ -11,7 +11,6 @@
"go/parser"
"go/token"
"math"
- "runtime"
"strconv"
"strings"
"unicode"
@@ -216,13 +215,8 @@
if v := gen.Request.GetCompilerVersion(); v != nil {
protocVersion = fmt.Sprintf("v%v.%v.%v", v.GetMajor(), v.GetMinor(), v.GetPatch())
}
- goVersion := runtime.Version()
- if strings.HasPrefix(goVersion, "go") {
- goVersion = "v" + goVersion[len("go"):]
- }
g.P("// \tprotoc-gen-go ", protocGenGoVersion)
g.P("// \tprotoc ", protocVersion)
- g.P("// \tgo ", goVersion)
}
if f.Proto.GetOptions().GetDeprecated() {