mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-04 02:38:50 +00:00
658051ba78
This produces exactly the same output as github.com/golang/protobuf. Change-Id: I01aacc9277c5cb5b4cc295f5ee8af12b4a524781 Reviewed-on: https://go-review.googlesource.com/134955 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
78 lines
2.8 KiB
Protocol Buffer
78 lines
2.8 KiB
Protocol Buffer
// 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.
|
|
|
|
syntax = "proto2";
|
|
|
|
package goproto.protoc.proto2;
|
|
|
|
option go_package = "google.golang.org/proto/cmd/protoc-gen-go/testdata/proto2";
|
|
|
|
message FieldTestMessage {
|
|
optional string optional_bool = 1;
|
|
optional Enum optional_enum = 2;
|
|
optional int32 optional_int32 = 3;
|
|
optional sint32 optional_sint32 = 4;
|
|
optional uint32 optional_uint32 = 5;
|
|
optional int64 optional_int64 = 6;
|
|
optional sint64 optional_sint64 = 7;
|
|
optional uint64 optional_uint64 = 8;
|
|
optional sfixed32 optional_sfixed32 = 9;
|
|
optional fixed32 optional_fixed32 = 10;
|
|
optional float optional_float = 11;
|
|
optional sfixed64 optional_sfixed64 = 12;
|
|
optional fixed64 optional_fixed64 = 13;
|
|
optional double optional_double = 14;
|
|
optional string optional_string = 15;
|
|
optional bytes optional_bytes = 16;
|
|
optional Message optional_Message = 17;
|
|
optional group OptionalGroup = 18 {
|
|
optional string optional_group = 19;
|
|
}
|
|
|
|
required string required_bool = 101;
|
|
required Enum required_enum = 102;
|
|
required int32 required_int32 = 103;
|
|
required sint32 required_sint32 = 104;
|
|
required uint32 required_uint32 = 105;
|
|
required int64 required_int64 = 106;
|
|
required sint64 required_sint64 = 107;
|
|
required uint64 required_uint64 = 108;
|
|
required sfixed32 required_sfixed32 = 109;
|
|
required fixed32 required_fixed32 = 110;
|
|
required float required_float = 111;
|
|
required sfixed64 required_sfixed64 = 112;
|
|
required fixed64 required_fixed64 = 113;
|
|
required double required_double = 114;
|
|
required string required_string = 115;
|
|
required bytes required_bytes = 116;
|
|
required Message required_Message = 117;
|
|
required group RequiredGroup = 118 {
|
|
required string required_group = 119;
|
|
}
|
|
|
|
repeated string repeated_bool = 201;
|
|
repeated Enum repeated_enum = 202;
|
|
repeated int32 repeated_int32 = 203;
|
|
repeated sint32 repeated_sint32 = 204;
|
|
repeated uint32 repeated_uint32 = 205;
|
|
repeated int64 repeated_int64 = 206;
|
|
repeated sint64 repeated_sint64 = 207;
|
|
repeated uint64 repeated_uint64 = 208;
|
|
repeated sfixed32 repeated_sfixed32 = 209;
|
|
repeated fixed32 repeated_fixed32 = 210;
|
|
repeated float repeated_float = 211;
|
|
repeated sfixed64 repeated_sfixed64 = 212;
|
|
repeated fixed64 repeated_fixed64 = 213;
|
|
repeated double repeated_double = 214;
|
|
repeated string repeated_string = 215;
|
|
repeated bytes repeated_bytes = 216;
|
|
repeated Message repeated_Message = 217;
|
|
repeated group RepeatedGroup = 218 {
|
|
repeated string repeated_group = 219;
|
|
}
|
|
|
|
enum Enum { ZERO = 0; }
|
|
message Message {}
|
|
}
|