Lines Matching +full:go +full:- +full:version
1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
8 "google.golang.org/protobuf/internal/version"
12 // MaxVersion is the maximum supported version for generated .pb.go files.
13 // It is always the current version of the module.
14 MaxVersion = version.Minor
16 // GenVersion is the runtime version required by generated .pb.go files.
21 // MinVersion is the minimum supported version for generated .pb.go files.
26 // EnforceVersion is used by code generated by protoc-gen-go
29 // - the runtime package is too old and needs to be updated OR
30 // - the generated code is too old and needs to be regenerated.
34 // go get google.golang.org/protobuf
38 // protoc --go_out=${PROTOC_GEN_GO_ARGS} ${PROTO_FILES}
43 // // Verify that this generated code is sufficiently up-to-date.
44 // _ = protoimpl.EnforceVersion(genVersion - protoimpl.MinVersion)
45 // // Verify that runtime/protoimpl is sufficiently up-to-date.
46 // _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - genVersion)
49 // The genVersion is the current minor version used to generated the code.
50 // This compile-time check relies on negative integer overflow of a uint
51 // being a compilation failure (guaranteed by the Go specification).
58 _ = EnforceVersion(GenVersion - MinVersion)
59 _ = EnforceVersion(MaxVersion - GenVersion)