Joe Tsai | f9123a3 | 2018-11-30 09:04:58 +0000 | [diff] [blame] | 1 | // Copyright 2018 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // Package protoimpl contains the default implementation for messages |
| 6 | // generated by protoc-gen-go. |
| 7 | // |
| 8 | // WARNING: This package should only ever be imported by generated messages. |
| 9 | // The compatibility agreement covers nothing except for functionality needed |
| 10 | // to keep existing generated messages operational. Breakages that occur due |
| 11 | // to unauthorized usages of this package are not the author's responsibility. |
| 12 | package protoimpl |
| 13 | |
| 14 | import "github.com/golang/protobuf/v2/internal/impl" |
| 15 | |
Joe Tsai | e1f8d50 | 2018-11-26 18:55:29 -0800 | [diff] [blame^] | 16 | // Version is the current minor version of the package. |
| 17 | // This is incremented every time the API of this package expands. |
| 18 | const Version = 0 // v2.{Version}.x |
| 19 | |
Joe Tsai | f9123a3 | 2018-11-30 09:04:58 +0000 | [diff] [blame] | 20 | var X impl.Export |
| 21 | |
Joe Tsai | e1f8d50 | 2018-11-26 18:55:29 -0800 | [diff] [blame^] | 22 | type ( |
| 23 | // EnforceVersion is used by code generated by protoc-gen-go |
| 24 | // to statically enforce a minimum version of this package. |
| 25 | // A compilation failure implies that this package is too old and |
| 26 | // needs to be updated to a more recent version. |
| 27 | // |
| 28 | // This package can be upgraded by running: |
| 29 | // go get -u github.com/golang/protobuf/v2/... |
| 30 | // |
| 31 | // Example usage by generated code: |
| 32 | // const _ = protoimpl.EnforceVersion(protoimpl.Version - genVersion) |
| 33 | // |
| 34 | // If genVersion is lower than Version, then this results in a negative |
| 35 | // integer overflow failure when evaluating the uint constant. |
| 36 | EnforceVersion uint |
| 37 | |
| 38 | MessageType = impl.MessageType |
| 39 | ) |