cmd/protoc-gen-go: --version should exit 0

Fixes golang/protobuf#1153.

Change-Id: Id2ada2353413c3371e677dcf3fdfa6fdc24a3c56
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/239339
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
This commit is contained in:
Kevin Burke 2020-06-19 16:23:55 -07:00
parent 5a96da2901
commit 95ba8ac240

View File

@ -24,7 +24,7 @@ import (
func main() {
if len(os.Args) == 2 && os.Args[1] == "--version" {
fmt.Fprintf(os.Stderr, "%v %v\n", filepath.Base(os.Args[0]), version.String())
os.Exit(1)
os.Exit(0)
}
var (