blob: 35e5d262d413765401e70bcc1d83fe2f58c3a0c6 [file] [log] [blame]
Joe Tsaif9123a32018-11-30 09:04:58 +00001// 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.
12package protoimpl
13
14import "github.com/golang/protobuf/v2/internal/impl"
15
Joe Tsaie1f8d502018-11-26 18:55:29 -080016// Version is the current minor version of the package.
17// This is incremented every time the API of this package expands.
18const Version = 0 // v2.{Version}.x
19
Joe Tsaif9123a32018-11-30 09:04:58 +000020var X impl.Export
21
Joe Tsaie1f8d502018-11-26 18:55:29 -080022type (
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)