2018-09-06 21:51:28 +00: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.
|
|
|
|
|
|
|
|
syntax = "proto2";
|
|
|
|
|
2018-09-17 22:11:24 +00:00
|
|
|
// COMMENT: package goproto.protoc.comments;
|
|
|
|
package goproto.protoc.comments;
|
2018-09-06 21:51:28 +00:00
|
|
|
|
2019-05-14 06:55:40 +00:00
|
|
|
option go_package = "google.golang.org/protobuf/cmd/protoc-gen-go/testdata/comments";
|
2018-09-06 21:51:28 +00:00
|
|
|
|
2019-08-06 08:15:48 +00:00
|
|
|
// COMMENT: Enum1.Leading
|
|
|
|
enum Enum1 {
|
|
|
|
// COMMENT: FOO.Leading
|
|
|
|
FOO = 0; // COMMENT: FOO.InlineTrailing
|
|
|
|
// COMMENT: BAR.Leading
|
|
|
|
BAR = 1;
|
|
|
|
// COMMENT: BAR.Trailing1
|
|
|
|
// COMMENT: BAR.Trailing2
|
|
|
|
|
|
|
|
// COMMENT: Enum1.EndBody
|
|
|
|
}
|
|
|
|
|
|
|
|
// COMMENT: Message1.Leading
|
2018-09-06 21:51:28 +00:00
|
|
|
message Message1 {
|
2019-08-06 08:15:48 +00:00
|
|
|
// COMMENT: Message1A.Leading
|
2018-09-06 21:51:28 +00:00
|
|
|
message Message1A {
|
2019-08-06 08:15:48 +00:00
|
|
|
} // COMMENT: Message1A.Trailing
|
2018-09-06 21:51:28 +00:00
|
|
|
|
|
|
|
// COMMENT: Message1B
|
|
|
|
message Message1B {
|
|
|
|
}
|
2018-10-08 18:18:15 +00:00
|
|
|
|
2019-08-06 08:15:48 +00:00
|
|
|
// COMMENT: Field1A.Leading
|
|
|
|
optional string Field1A = 1; // COMMENT: Field1A.Trailing
|
2018-10-08 18:18:15 +00:00
|
|
|
|
2019-08-06 08:15:48 +00:00
|
|
|
// COMMENT: Oneof1A.Leading
|
2018-10-08 18:18:15 +00:00
|
|
|
oneof Oneof1a {
|
2019-08-06 08:15:48 +00:00
|
|
|
// COMMENT: Oneof1AField1.Leading
|
|
|
|
string Oneof1AField1 = 2; // COMMENT: Oneof1AField1.Trailing
|
|
|
|
} // COMMENT: Oneof1A.Trailing
|
|
|
|
|
|
|
|
extensions 100 to max;
|
|
|
|
} // COMMENT: Message1.Trailing
|
|
|
|
|
|
|
|
// COMMENT: Extend
|
|
|
|
extend Message1 {
|
|
|
|
// COMMENT: Extension.Leading
|
|
|
|
optional Message1 extension = 100; // COMMENT: Extension.Trailing
|
2018-09-06 21:51:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// COMMENT: Message2
|
|
|
|
message Message2 {
|
|
|
|
// COMMENT: Message2A
|
|
|
|
message Message2A {
|
|
|
|
}
|
|
|
|
|
|
|
|
// COMMENT: Message2B
|
|
|
|
message Message2B {
|
|
|
|
}
|
|
|
|
}
|