GoPLS Viewer

Home|gopls/cmd/guru/testdata/src/describe/main.golden
1-------- @describe pkgdecl --------
2definition of package "describe"
3    type  C      int
4        method (*C) f()
5    type  D      struct{...}
6        method (D) f()
7    type  I      interface{f()}
8        method (I) f()
9    const c      untyped int = 0
10    type  cake   float64
11    var   global *string
12    func  main   func()
13    func  newD   func() D
14    const pi     untyped float = 3.141
15    const pie    cake = 3.141
16
17-------- @describe badimport1 --------
18import of package "nosuchpkg"
19
20-------- @describe badimport2 --------
21reference to package "nosuchpkg"
22
23-------- @describe type-ref-builtin --------
24reference to built-in type float64
25
26-------- @describe const-ref-iota --------
27reference to const iota untyped int of value 0
28
29-------- @describe const-def-pi --------
30definition of const pi untyped float of value 3.141
31
32-------- @describe const-def-pie --------
33definition of const pie cake of value 3.141
34Named types:
35    type cake defined here
36
37-------- @describe const-ref-pi --------
38reference to const pi untyped float of value 3.141
39defined here
40
41-------- @describe func-def-main --------
42definition of func main()
43
44-------- @describe func-ref-main --------
45reference to func main()
46defined here
47
48-------- @describe func-ref-*C.f --------
49reference to method func (*C).f()
50defined here
51
52-------- @describe func-ref-D.f --------
53reference to method func (D).f()
54defined here
55
56-------- @describe func-ref-I.f --------
57reference to interface method func (I).f()
58defined here
59
60-------- @describe type-D --------
61reference to type D (size 32, align 8)
62defined as struct{Field int; AnotherField string; ThirdField C}
63Methods:
64    method (D) f()
65Fields:
66    Field        int
67    AnotherField string
68    ThirdField   C
69
70-------- @describe type-I --------
71reference to type I (size 16, align 8)
72defined as interface{f()}
73Methods:
74    method (I) f()
75
76-------- @describe func-ref-d.f --------
77reference to method func (D).f()
78defined here
79
80-------- @describe func-ref-i.f --------
81reference to interface method func (I).f()
82defined here
83
84-------- @describe slice-of-D --------
85definition of var slice []D
86Named types:
87    type D defined here
88
89-------- @describe ptr-with-nonptr-methods --------
90definition of var dptr *D
91Methods:
92    method (*D) f()
93Fields:
94    Field        int
95    AnotherField string
96    ThirdField   C
97Named types:
98    type D defined here
99
100-------- @describe ref-lexical-d --------
101reference to var d D
102defined here
103Methods:
104    method (D) f()
105Fields:
106    Field        int
107    AnotherField string
108    ThirdField   C
109Named types:
110    type D defined here
111
112-------- @describe ref-anon --------
113reference to var anon func()
114defined here
115
116-------- @describe ref-global --------
117reference to var global *string
118defined here
119
120-------- @describe var-def-x-1 --------
121definition of var x *int
122
123-------- @describe var-ref-x-1 --------
124reference to var x *int
125defined here
126
127-------- @describe var-def-x-2 --------
128reference to var x *int
129defined here
130
131-------- @describe var-ref-x-2 --------
132reference to var x *int
133defined here
134
135-------- @describe var-ref-i-C --------
136reference to var i I
137defined here
138Methods:
139    method (I) f()
140Named types:
141    type I defined here
142
143-------- @describe var-ref-i-D --------
144reference to var i I
145defined here
146Methods:
147    method (I) f()
148Named types:
149    type I defined here
150
151-------- @describe var-ref-i --------
152reference to var i I
153defined here
154Methods:
155    method (I) f()
156Named types:
157    type I defined here
158
159-------- @describe const-local-pi --------
160definition of const localpi untyped float of value 3.141
161
162-------- @describe const-local-pie --------
163definition of const localpie cake of value 3.141
164Named types:
165    type cake defined here
166
167-------- @describe const-ref-localpi --------
168reference to const localpi untyped float of value 3.141
169defined here
170
171-------- @describe type-def-T --------
172definition of type T (size 8, align 8)
173No methods.
174
175-------- @describe type-ref-T --------
176reference to type T (size 8, align 8)
177defined as int
178No methods.
179
180-------- @describe const-expr --------
181binary * operation of value 6
182
183-------- @describe const-expr2 --------
184binary - operation of value -2
185
186-------- @describe map-lookup,ok --------
187index expression of type (*int, bool)
188
189-------- @describe mapval --------
190reference to var mapval *int
191defined here
192
193-------- @describe m --------
194reference to var m map[string]*int
195defined here
196
197-------- @describe defer-stmt --------
198defer statement
199
200-------- @describe go-stmt --------
201go statement
202
203-------- @describe builtin-ref-panic --------
204function call (or conversion) of type ()
205
206-------- @describe var-decl-stmt --------
207definition of var a2 int
208
209-------- @describe var-decl-stmt2 --------
210definition of var _ int
211
212-------- @describe var-def-blank --------
213definition of var _ int
214
215-------- @describe lib-outer --------
216reference to type lib.Outer (size 56, align 8)
217defined as struct{A int; b int; lib.inner}
218No methods.
219Fields:
220    A                 int
221    inner.C           bool
222    inner.recursive.E bool
223
224-------- @describe var-map-of-C-D --------
225definition of var mmm map[C]D
226Named types:
227    type C defined here
228    type D defined here
229
230-------- @describe field-access --------
231reference to field ThirdField C
232defined here
233Methods:
234    method (*C) f()
235Named types:
236    type C defined here
237
238-------- @describe call-unknown --------
239function call of type invalid type
240
241-------- @describe def-iface-I --------
242definition of type I (size 16, align 8)
243Methods:
244    method (I) f()
245
246-------- @describe def-imethod-I.f --------
247definition of interface method func (I).f()
248
249
MembersX
Members
X