blob: 8401be8c84fa10f63aa206a782fee3cbb9274b67 [file] [log] [blame]
Joe Tsaia2dd2282019-04-10 16:45:04 -07001// Copyright 2019 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 descopts contains the nil pointers to concrete descriptor options.
6//
7// This package exists as a form of reverse dependency injection so that certain
Joe Tsaid8881392019-06-06 13:01:53 -07008// packages (e.g., internal/filedesc and internal/filetype can avoid a direct
9// dependency on the descriptor proto package).
Joe Tsaia2dd2282019-04-10 16:45:04 -070010package descopts
11
Damien Neile89e6242019-05-13 23:55:40 -070012import pref "google.golang.org/protobuf/reflect/protoreflect"
Joe Tsaia2dd2282019-04-10 16:45:04 -070013
14// These variables are set by the init function in descriptor.pb.go via logic
Joe Tsaid8881392019-06-06 13:01:53 -070015// in internal/filetype. In other words, so long as the descriptor proto package
Joe Tsaia2dd2282019-04-10 16:45:04 -070016// is linked in, these variables will be populated.
17//
18// Each variable is populated with a nil pointer to the options struct.
19var (
20 File pref.ProtoMessage
21 Enum pref.ProtoMessage
22 EnumValue pref.ProtoMessage
23 Message pref.ProtoMessage
24 Field pref.ProtoMessage
25 Oneof pref.ProtoMessage
26 ExtensionRange pref.ProtoMessage
27 Service pref.ProtoMessage
28 Method pref.ProtoMessage
29)