...

Source file src/google.golang.org/protobuf/internal/descopts/options.go

Documentation: google.golang.org/protobuf/internal/descopts

     1  // 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
     8  // packages (e.g., internal/filedesc and internal/filetype can avoid a direct
     9  // dependency on the descriptor proto package).
    10  package descopts
    11  
    12  import pref "google.golang.org/protobuf/reflect/protoreflect"
    13  
    14  // These variables are set by the init function in descriptor.pb.go via logic
    15  // in internal/filetype. In other words, so long as the descriptor proto package
    16  // is linked in, these variables will be populated.
    17  //
    18  // Each variable is populated with a nil pointer to the options struct.
    19  var (
    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  )
    30  

View as plain text