protoc-gen-go/generator: print deprecation warning at init
Change-Id: I1917b96cfc472963eaf63e2a2272e1832dd4ebb8
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/167379
Reviewed-by: Damien Neil <dneil@google.com>
Joe Tsai authored 5 years ago
Joe Tsai committed 5 years ago
36 | 36 | "github.com/golang/protobuf/protoc-gen-go/descriptor" |
37 | 37 | plugin "github.com/golang/protobuf/protoc-gen-go/plugin" |
38 | 38 | ) |
39 | ||
40 | func init() { | |
41 | fmt.Fprint(os.Stderr, | |
42 | "WARNING: Package github.com/golang/protobuf/protoc-gen-go/generator is deprecated.\n"+ | |
43 | "\tA future release of golang/protobuf will delete this package,\n"+ | |
44 | "\twhich has long been excluded from the compatibility promise.\n\n") | |
45 | } | |
39 | 46 | |
40 | 47 | // generatedCodeVersion indicates a version of the generated code. |
41 | 48 | // It is incremented whenever an incompatibility between the generated code and |