-
Notifications
You must be signed in to change notification settings - Fork 0
/
convert_duplicates.txt
92 lines (71 loc) · 1.2 KB
/
convert_duplicates.txt
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
gunk convert util.proto
cmp util.gunk util.gunk.golden
! gunk convert util2.proto
stderr 'Error: util2.proto:13:1: Event_Source redeclared in this block'
gunk convert util3.proto
cmp util3.gunk util3.gunk.golden
-- util.proto --
syntax = "proto3";
package util;
message Event {
message Source {
string name = 1;
}
Source source = 1;
bool received = 2;
}
message Source {
string name = 1;
}
-- util.gunk.golden --
package util
type Event_Source struct {
Name string `pb:"1" json:"name"`
}
type Event struct {
Source Event_Source `pb:"1" json:"source"`
Received bool `pb:"2" json:"received"`
}
type Source struct {
Name string `pb:"1" json:"name"`
}
-- util2.proto --
syntax = "proto3";
package util;
message Event {
message Source {
string name = 1;
}
Source source = 1;
bool received = 2;
}
message Event_Source {
string name = 1;
}
-- util3.proto --
syntax = "proto3";
package util;
message Foo {
enum Status {
UNKNOWN = 0;
}
}
message Bar {
enum Available {
UNKNOWN = 0;
}
}
-- util3.gunk.golden --
package util
type Status int
const (
UNKNOWN Status = iota
)
type Foo struct {
}
type Available int
const (
Available_UNKNOWN Available = iota
)
type Bar struct {
}