You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB

  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. // Package descopts contains the nil pointers to concrete descriptor options.
  5. //
  6. // This package exists as a form of reverse dependency injection so that certain
  7. // packages (e.g., internal/filedesc and internal/filetype can avoid a direct
  8. // dependency on the descriptor proto package).
  9. package descopts
  10. import pref "google.golang.org/protobuf/reflect/protoreflect"
  11. // These variables are set by the init function in descriptor.pb.go via logic
  12. // in internal/filetype. In other words, so long as the descriptor proto package
  13. // is linked in, these variables will be populated.
  14. //
  15. // Each variable is populated with a nil pointer to the options struct.
  16. var (
  17. File pref.ProtoMessage
  18. Enum pref.ProtoMessage
  19. EnumValue pref.ProtoMessage
  20. Message pref.ProtoMessage
  21. Field pref.ProtoMessage
  22. Oneof pref.ProtoMessage
  23. ExtensionRange pref.ProtoMessage
  24. Service pref.ProtoMessage
  25. Method pref.ProtoMessage
  26. )