Debian Codegraph @

testdata/script/interface.txtar

raw
1 exec gofumpt -w foo.go
2 cmp foo.go foo.go.golden
3
4 exec gofumpt -d foo.go.golden
5 ! stdout .
6
7 -- foo.go --
8 package p
9
10 type i1 interface {
11
12 a(x int) int
13
14
15
16 b(x int) int
17
18 c(x int) int
19
20 D()
21
22 E()
23
24 f()
25 }
26
27 type i2 interface {
28
29 // comment for a
30 a(x int) int
31
32 // comment between a and b
33
34 // comment for b
35 b(x int) int
36
37 // comment between b and c
38
39 c(x int) int
40
41 d(x int) int
42
43 // comment for e
44 e(x int) int
45
46 }
47
48 type i3 interface {
49 a(x int) int
50
51 // standalone comment
52
53 b(x int) int
54 }
55
56 type leadingLine1 interface {
57
58
59 a(x int) int
60 }
61
62 type leadingLine2 interface {
63
64 a(x int) int
65 }
66
67 type leadingLine3 interface {
68
69 // comment
70 a(x int) int
71 }
72
73 type leadingLine4 interface {
74 // comment
75
76 a(x int) int
77 }
78
79 type leadingLine5 interface {
80 // comment
81
82 // comment for a
83 a(x int) int
84 }
85
86 type leadingLine6 interface {
87
88 // comment
89
90 // comment for a
91 a(x int) int
92 }
93
94 type leadingLine7 interface {
95
96
97 // comment
98
99 // comment for a
100 a(x int) int
101 }
102
103 type leadingLine8 interface {
104 // comment
105 }
106
107 type ii1 interface {
108 DoA()
109 DoB()
110
111 UndoA()
112 UndoB()
113 }
114 -- foo.go.golden --
115 package p
116
117 type i1 interface {
118 a(x int) int
119
120 b(x int) int
121
122 c(x int) int
123
124 D()
125
126 E()
127
128 f()
129 }
130
131 type i2 interface {
132 // comment for a
133 a(x int) int
134
135 // comment between a and b
136
137 // comment for b
138 b(x int) int
139
140 // comment between b and c
141
142 c(x int) int
143
144 d(x int) int
145
146 // comment for e
147 e(x int) int
148 }
149
150 type i3 interface {
151 a(x int) int
152
153 // standalone comment
154
155 b(x int) int
156 }
157
158 type leadingLine1 interface {
159 a(x int) int
160 }
161
162 type leadingLine2 interface {
163 a(x int) int
164 }
165
166 type leadingLine3 interface {
167 // comment
168 a(x int) int
169 }
170
171 type leadingLine4 interface {
172 // comment
173
174 a(x int) int
175 }
176
177 type leadingLine5 interface {
178 // comment
179
180 // comment for a
181 a(x int) int
182 }
183
184 type leadingLine6 interface {
185 // comment
186
187 // comment for a
188 a(x int) int
189 }
190
191 type leadingLine7 interface {
192 // comment
193
194 // comment for a
195 a(x int) int
196 }
197
198 type leadingLine8 interface {
199 // comment
200 }
201
202 type ii1 interface {
203 DoA()
204 DoB()
205
206 UndoA()
207 UndoB()
208 }