File: nested.proto

package info (click to toggle)
golang-github-lyft-protoc-gen-star 2.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 940 kB
  • sloc: makefile: 145
file content (27 lines) | stat: -rw-r--r-- 563 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
syntax="proto3";
package graph.nested;

message Foo {
    Bar x = 1; // usage before declaration

    // nested message
    message Bar {
        Baz a = 1; // usage before declaration

        // doubly nested enum
        enum Baz {VALUE = 0;}
        Baz b = 2; // usage after declaration

        // doubly nested message
        message Quux {}
        Quux c = 3;
    }

    Bar y = 2; // usage after declaration

    // same name, different scope
    enum Baz {VALUE = 0;}
    Baz shallow = 3;

    Bar.Baz deep = 4; // usage of deeply nested child enum
}