2018-09-17 15:11:24 -07:00
|
|
|
// Copyright 2018 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2018-10-09 12:49:13 -07:00
|
|
|
syntax = "proto2";
|
2018-09-17 15:11:24 -07:00
|
|
|
|
|
|
|
package goproto.protoc.import_public.sub;
|
|
|
|
|
2018-09-21 17:44:00 -07:00
|
|
|
option go_package = "github.com/golang/protobuf/v2/cmd/protoc-gen-go/testdata/import_public/sub";
|
2018-09-17 15:11:24 -07:00
|
|
|
|
|
|
|
import "import_public/sub/b.proto";
|
2019-01-06 16:22:13 -08:00
|
|
|
import public "import_public/sub2/a.proto";
|
2018-09-17 15:11:24 -07:00
|
|
|
|
|
|
|
message M {
|
|
|
|
// Field using a type in the same Go package, but a different source file.
|
2018-10-09 12:49:13 -07:00
|
|
|
optional M2 m2 = 1;
|
|
|
|
optional string s = 4 [default="default"];
|
2018-11-29 08:57:07 -08:00
|
|
|
optional bytes b = 5 [default="default"];
|
|
|
|
optional double f = 6 [default=nan];
|
2018-09-17 15:11:24 -07:00
|
|
|
|
|
|
|
oneof oneof_field {
|
|
|
|
int32 oneof_int32 = 2;
|
|
|
|
int64 oneof_int64 = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Submessage {
|
|
|
|
enum Submessage_Subenum {
|
|
|
|
M_SUBMESSAGE_ZERO = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
oneof submessage_oneof_field {
|
|
|
|
int32 submessage_oneof_int32 = 1;
|
|
|
|
int64 submessage_oneof_int64 = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Subenum {
|
|
|
|
M_ZERO = 0;
|
|
|
|
}
|
2018-10-29 09:14:14 -07:00
|
|
|
|
|
|
|
extensions 100 to max;
|
|
|
|
}
|
|
|
|
|
|
|
|
extend M {
|
|
|
|
optional string extension_field = 100;
|
2018-09-17 15:11:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
enum E {
|
|
|
|
ZERO = 0;
|
|
|
|
}
|