github.com/april1989/origin-go-tools@v0.0.32/cmd/guru/testdata/src/referrers-json/main.golden (about) 1 -------- @referrers ref-package -------- 2 { 3 "desc": "package lib" 4 } 5 { 6 "package": "definition-json", 7 "refs": [ 8 { 9 "pos": "testdata/src/definition-json/main.go:19:8", 10 "text": "\tvar x lib.T // @definition lexical-pkgname \"lib\"" 11 }, 12 { 13 "pos": "testdata/src/definition-json/main.go:25:8", 14 "text": "\tvar _ lib.Type // @definition qualified-type \"Type\"" 15 }, 16 { 17 "pos": "testdata/src/definition-json/main.go:26:8", 18 "text": "\tvar _ lib.Func // @definition qualified-func \"Func\"" 19 }, 20 { 21 "pos": "testdata/src/definition-json/main.go:27:8", 22 "text": "\tvar _ lib.Var // @definition qualified-var \"Var\"" 23 }, 24 { 25 "pos": "testdata/src/definition-json/main.go:28:8", 26 "text": "\tvar _ lib.Const // @definition qualified-const \"Const\"" 27 }, 28 { 29 "pos": "testdata/src/definition-json/main.go:29:8", 30 "text": "\tvar _ lib2.Type // @definition qualified-type-renaming \"Type\"" 31 }, 32 { 33 "pos": "testdata/src/definition-json/main.go:30:8", 34 "text": "\tvar _ lib.Nonesuch // @definition qualified-nomember \"Nonesuch\"" 35 }, 36 { 37 "pos": "testdata/src/definition-json/main.go:63:2", 38 "text": "\tlib.Type // @definition embedded-other-pkg \"Type\"" 39 } 40 ] 41 } 42 { 43 "package": "describe", 44 "refs": [ 45 { 46 "pos": "testdata/src/describe/main.go:92:8", 47 "text": "\tvar _ lib.Outer // @describe lib-outer \"Outer\"" 48 } 49 ] 50 } 51 { 52 "package": "imports", 53 "refs": [ 54 { 55 "pos": "testdata/src/imports/main.go:18:12", 56 "text": "\tconst c = lib.Const // @describe ref-const \"Const\"" 57 }, 58 { 59 "pos": "testdata/src/imports/main.go:19:2", 60 "text": "\tlib.Func() // @describe ref-func \"Func\"" 61 }, 62 { 63 "pos": "testdata/src/imports/main.go:20:2", 64 "text": "\tlib.Var++ // @describe ref-var \"Var\"" 65 }, 66 { 67 "pos": "testdata/src/imports/main.go:21:8", 68 "text": "\tvar t lib.Type // @describe ref-type \"Type\"" 69 }, 70 { 71 "pos": "testdata/src/imports/main.go:26:8", 72 "text": "\tvar _ lib.Type // @describe ref-pkg \"lib\"" 73 } 74 ] 75 } 76 { 77 "package": "referrers", 78 "refs": [ 79 { 80 "pos": "testdata/src/referrers/int_test.go:7:7", 81 "text": "\t_ = (lib.Type).Method // ref from internal test package" 82 } 83 ] 84 } 85 { 86 "package": "referrers", 87 "refs": [ 88 { 89 "pos": "testdata/src/referrers/main.go:16:8", 90 "text": "\tvar v lib.Type = lib.Const // @referrers ref-package \"lib\"" 91 }, 92 { 93 "pos": "testdata/src/referrers/main.go:16:19", 94 "text": "\tvar v lib.Type = lib.Const // @referrers ref-package \"lib\"" 95 } 96 ] 97 } 98 { 99 "package": "referrers-json", 100 "refs": [ 101 { 102 "pos": "testdata/src/referrers-json/main.go:14:8", 103 "text": "\tvar v lib.Type = lib.Const // @referrers ref-package \"lib\"" 104 }, 105 { 106 "pos": "testdata/src/referrers-json/main.go:14:19", 107 "text": "\tvar v lib.Type = lib.Const // @referrers ref-package \"lib\"" 108 } 109 ] 110 } 111 { 112 "package": "referrers_test", 113 "refs": [ 114 { 115 "pos": "testdata/src/referrers/ext_test.go:10:7", 116 "text": "\t_ = (lib.Type).Method // ref from external test package" 117 } 118 ] 119 } 120 { 121 "package": "what-json", 122 "refs": [ 123 { 124 "pos": "testdata/src/what-json/main.go:13:7", 125 "text": "var _ lib.Var // @what pkg \"lib\"" 126 }, 127 { 128 "pos": "testdata/src/what-json/main.go:14:8", 129 "text": "type _ lib.T" 130 } 131 ] 132 } 133 -------- @referrers ref-method -------- 134 { 135 "objpos": "testdata/src/lib/lib.go:5:13", 136 "desc": "func (lib.Type).Method(x *int) *int" 137 } 138 { 139 "package": "imports", 140 "refs": [ 141 { 142 "pos": "testdata/src/imports/main.go:22:9", 143 "text": "\tp := t.Method(\u0026a) // @describe ref-method \"Method\"" 144 } 145 ] 146 } 147 { 148 "package": "referrers", 149 "refs": [ 150 { 151 "pos": "testdata/src/referrers/int_test.go:7:17", 152 "text": "\t_ = (lib.Type).Method // ref from internal test package" 153 } 154 ] 155 } 156 { 157 "package": "referrers", 158 "refs": [ 159 { 160 "pos": "testdata/src/referrers/main.go:17:8", 161 "text": "\t_ = v.Method // @referrers ref-method \"Method\"" 162 }, 163 { 164 "pos": "testdata/src/referrers/main.go:18:8", 165 "text": "\t_ = v.Method" 166 } 167 ] 168 } 169 { 170 "package": "referrers-json", 171 "refs": [ 172 { 173 "pos": "testdata/src/referrers-json/main.go:15:8", 174 "text": "\t_ = v.Method // @referrers ref-method \"Method\"" 175 }, 176 { 177 "pos": "testdata/src/referrers-json/main.go:16:8", 178 "text": "\t_ = v.Method" 179 } 180 ] 181 } 182 { 183 "package": "referrers_test", 184 "refs": [ 185 { 186 "pos": "testdata/src/referrers/ext_test.go:10:17", 187 "text": "\t_ = (lib.Type).Method // ref from external test package" 188 } 189 ] 190 } 191 -------- @referrers ref-local -------- 192 { 193 "objpos": "testdata/src/referrers-json/main.go:14:6", 194 "desc": "var v lib.Type" 195 } 196 { 197 "package": "referrers-json", 198 "refs": [ 199 { 200 "pos": "testdata/src/referrers-json/main.go:15:6", 201 "text": "\t_ = v.Method // @referrers ref-method \"Method\"" 202 }, 203 { 204 "pos": "testdata/src/referrers-json/main.go:16:6", 205 "text": "\t_ = v.Method" 206 }, 207 { 208 "pos": "testdata/src/referrers-json/main.go:17:2", 209 "text": "\tv++ //@referrers ref-local \"v\"" 210 }, 211 { 212 "pos": "testdata/src/referrers-json/main.go:18:2", 213 "text": "\tv++" 214 } 215 ] 216 } 217 -------- @referrers ref-field -------- 218 { 219 "objpos": "testdata/src/referrers-json/main.go:10:2", 220 "desc": "field f int" 221 } 222 { 223 "package": "referrers-json", 224 "refs": [ 225 { 226 "pos": "testdata/src/referrers-json/main.go:20:10", 227 "text": "\t_ = s{}.f // @referrers ref-field \"f\"" 228 }, 229 { 230 "pos": "testdata/src/referrers-json/main.go:23:5", 231 "text": "\ts2.f = 1" 232 } 233 ] 234 }