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