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