a.proto 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. syntax = "proto2";
  5. package goproto.protoc.import_public.sub;
  6. option go_package = "google.golang.org/protobuf/cmd/protoc-gen-go/testdata/import_public/sub";
  7. import "import_public/sub/b.proto";
  8. import public "import_public/sub2/a.proto";
  9. message M {
  10. // Field using a type in the same Go package, but a different source file.
  11. optional M2 m2 = 1;
  12. optional string s = 4 [default="default"];
  13. optional bytes b = 5 [default="default"];
  14. optional double f = 6 [default=nan];
  15. oneof oneof_field {
  16. int32 oneof_int32 = 2;
  17. int64 oneof_int64 = 3;
  18. }
  19. message Submessage {
  20. enum Submessage_Subenum {
  21. M_SUBMESSAGE_ZERO = 0;
  22. }
  23. oneof submessage_oneof_field {
  24. int32 submessage_oneof_int32 = 1;
  25. int64 submessage_oneof_int64 = 2;
  26. }
  27. }
  28. enum Subenum {
  29. M_ZERO = 0;
  30. }
  31. extensions 100 to max;
  32. }
  33. extend M {
  34. optional string extension_field = 100;
  35. }
  36. enum E {
  37. ZERO = 0;
  38. }