| -- AB-hoverdef -- |
| ```go |
| func (a.I).B() |
| ``` |
| |
| @mark(AB, "B") |
| |
| |
| [`(a.I).B` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#I.B) |
| -- AField-hoverdef -- |
| ```go |
| field Field int |
| ``` |
| |
| @mark(AField, "Field") |
| |
| |
| [`(a.S).Field` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#S.Field) |
| -- AField2-hoverdef -- |
| ```go |
| field Field2 int |
| ``` |
| |
| @mark(AField2, "Field2") |
| |
| |
| [`(a.R).Field2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#R.Field2) |
| -- AGoodbye-hoverdef -- |
| ```go |
| func (a.H).Goodbye() |
| ``` |
| |
| @mark(AGoodbye, "Goodbye") |
| |
| |
| [`(a.H).Goodbye` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#H.Goodbye) |
| -- AHello-hoverdef -- |
| ```go |
| func (a.J).Hello() |
| ``` |
| |
| @mark(AHello, "Hello") |
| |
| |
| [`(a.J).Hello` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#J.Hello) |
| -- AHey-hoverdef -- |
| ```go |
| func (a.R).Hey() |
| ``` |
| |
| [`(a.R).Hey` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#R.Hey) |
| -- AHi-hoverdef -- |
| ```go |
| func (a.A).Hi() |
| ``` |
| |
| [`(a.A).Hi` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#A.Hi) |
| -- AImport-definition -- |
| godef/b/b.go:5:2-31: defined here as ```go |
| package a ("golang.org/lsptests/godef/a") |
| ``` |
| |
| [`a` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a) |
| -- AImport-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 5, |
| "column": 2, |
| "offset": 100 |
| }, |
| "end": { |
| "line": 5, |
| "column": 31, |
| "offset": 129 |
| } |
| }, |
| "description": "```go\npackage a (\"golang.org/lsptests/godef/a\")\n```\n\n[`a` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a)" |
| } |
| |
| -- AImport-hoverdef -- |
| ```go |
| package a ("golang.org/lsptests/godef/a") |
| ``` |
| |
| [`a` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a) |
| -- AString-definition -- |
| godef/a/a.go:26:6-7: defined here as ```go |
| type A string |
| |
| func (a.A).Hi() |
| ``` |
| |
| @mark(AString, "A") |
| |
| |
| [`a.A` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#A) |
| -- AString-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/a/a.go", |
| "start": { |
| "line": 26, |
| "column": 6, |
| "offset": 467 |
| }, |
| "end": { |
| "line": 26, |
| "column": 7, |
| "offset": 468 |
| } |
| }, |
| "description": "```go\ntype A string\n\nfunc (a.A).Hi()\n```\n\n@mark(AString, \"A\")\n\n\n[`a.A` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#A)" |
| } |
| |
| -- AString-hoverdef -- |
| ```go |
| type A string |
| |
| func (a.A).Hi() |
| ``` |
| |
| @mark(AString, "A") |
| |
| |
| [`a.A` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#A) |
| -- AStuff-definition -- |
| godef/a/a.go:28:6-12: defined here as ```go |
| func a.AStuff() |
| ``` |
| |
| [`a.AStuff` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#AStuff) |
| -- AStuff-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/a/a.go", |
| "start": { |
| "line": 28, |
| "column": 6, |
| "offset": 504 |
| }, |
| "end": { |
| "line": 28, |
| "column": 12, |
| "offset": 510 |
| } |
| }, |
| "description": "```go\nfunc a.AStuff()\n```\n\n[`a.AStuff` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#AStuff)" |
| } |
| |
| -- AStuff-hoverdef -- |
| ```go |
| func a.AStuff() |
| ``` |
| |
| [`a.AStuff` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/a#AStuff) |
| -- S1-definition -- |
| godef/b/b.go:27:6-8: defined here as ```go |
| type S1 struct { |
| F1 int //@mark(S1F1, "F1") |
| S2 //@godef("S2", S2),mark(S1S2, "S2") |
| a.A //@godef("A", AString) |
| aAlias //@godef("a", aAlias) |
| } |
| ``` |
| |
| [`b.S1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1) |
| -- S1-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 27, |
| "column": 6, |
| "offset": 563 |
| }, |
| "end": { |
| "line": 27, |
| "column": 8, |
| "offset": 565 |
| } |
| }, |
| "description": "```go\ntype S1 struct {\n\tF1 int //@mark(S1F1, \"F1\")\n\tS2 //@godef(\"S2\", S2),mark(S1S2, \"S2\")\n\ta.A //@godef(\"A\", AString)\n\taAlias //@godef(\"a\", aAlias)\n}\n```\n\n[`b.S1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1)" |
| } |
| |
| -- S1-hoverdef -- |
| ```go |
| type S1 struct { |
| F1 int //@mark(S1F1, "F1") |
| S2 //@godef("S2", S2),mark(S1S2, "S2") |
| a.A //@godef("A", AString) |
| aAlias //@godef("a", aAlias) |
| } |
| ``` |
| |
| [`b.S1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1) |
| -- S1F1-definition -- |
| godef/b/b.go:28:2-4: defined here as ```go |
| field F1 int |
| ``` |
| |
| @mark(S1F1, "F1") |
| |
| |
| [`(b.S1).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1.F1) |
| -- S1F1-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 28, |
| "column": 2, |
| "offset": 582 |
| }, |
| "end": { |
| "line": 28, |
| "column": 4, |
| "offset": 584 |
| } |
| }, |
| "description": "```go\nfield F1 int\n```\n\n@mark(S1F1, \"F1\")\n\n\n[`(b.S1).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1.F1)" |
| } |
| |
| -- S1F1-hoverdef -- |
| ```go |
| field F1 int |
| ``` |
| |
| @mark(S1F1, "F1") |
| |
| |
| [`(b.S1).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1.F1) |
| -- S1S2-definition -- |
| godef/b/b.go:29:2-4: defined here as ```go |
| field S2 S2 |
| ``` |
| |
| @godef("S2", S2),mark(S1S2, "S2") |
| |
| |
| [`(b.S1).S2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1.S2) |
| -- S1S2-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 29, |
| "column": 2, |
| "offset": 614 |
| }, |
| "end": { |
| "line": 29, |
| "column": 4, |
| "offset": 616 |
| } |
| }, |
| "description": "```go\nfield S2 S2\n```\n\n@godef(\"S2\", S2),mark(S1S2, \"S2\")\n\n\n[`(b.S1).S2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1.S2)" |
| } |
| |
| -- S1S2-hoverdef -- |
| ```go |
| field S2 S2 |
| ``` |
| |
| @godef("S2", S2),mark(S1S2, "S2") |
| |
| |
| [`(b.S1).S2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S1.S2) |
| -- S2-definition -- |
| godef/b/b.go:34:6-8: defined here as ```go |
| type S2 struct { |
| F1 string //@mark(S2F1, "F1") |
| F2 int //@mark(S2F2, "F2") |
| *a.A //@godef("A", AString),godef("a",AImport) |
| } |
| ``` |
| |
| [`b.S2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2) |
| -- S2-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 34, |
| "column": 6, |
| "offset": 738 |
| }, |
| "end": { |
| "line": 34, |
| "column": 8, |
| "offset": 740 |
| } |
| }, |
| "description": "```go\ntype S2 struct {\n\tF1 string //@mark(S2F1, \"F1\")\n\tF2 int //@mark(S2F2, \"F2\")\n\t*a.A //@godef(\"A\", AString),godef(\"a\",AImport)\n}\n```\n\n[`b.S2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2)" |
| } |
| |
| -- S2-hoverdef -- |
| ```go |
| type S2 struct { |
| F1 string //@mark(S2F1, "F1") |
| F2 int //@mark(S2F2, "F2") |
| *a.A //@godef("A", AString),godef("a",AImport) |
| } |
| ``` |
| |
| [`b.S2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2) |
| -- S2F1-definition -- |
| godef/b/b.go:35:2-4: defined here as ```go |
| field F1 string |
| ``` |
| |
| @mark(S2F1, "F1") |
| |
| |
| [`(b.S2).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2.F1) |
| -- S2F1-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 35, |
| "column": 2, |
| "offset": 757 |
| }, |
| "end": { |
| "line": 35, |
| "column": 4, |
| "offset": 759 |
| } |
| }, |
| "description": "```go\nfield F1 string\n```\n\n@mark(S2F1, \"F1\")\n\n\n[`(b.S2).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2.F1)" |
| } |
| |
| -- S2F1-hoverdef -- |
| ```go |
| field F1 string |
| ``` |
| |
| @mark(S2F1, "F1") |
| |
| |
| [`(b.S2).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2.F1) |
| -- S2F2-definition -- |
| godef/b/b.go:36:2-4: defined here as ```go |
| field F2 int |
| ``` |
| |
| @mark(S2F2, "F2") |
| |
| |
| [`(b.S2).F2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2.F2) |
| -- S2F2-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 36, |
| "column": 2, |
| "offset": 790 |
| }, |
| "end": { |
| "line": 36, |
| "column": 4, |
| "offset": 792 |
| } |
| }, |
| "description": "```go\nfield F2 int\n```\n\n@mark(S2F2, \"F2\")\n\n\n[`(b.S2).F2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2.F2)" |
| } |
| |
| -- S2F2-hoverdef -- |
| ```go |
| field F2 int |
| ``` |
| |
| @mark(S2F2, "F2") |
| |
| |
| [`(b.S2).F2` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#S2.F2) |
| -- aAlias-definition -- |
| godef/b/b.go:25:6-12: defined here as ```go |
| type aAlias = a.A |
| |
| func (a.A).Hi() |
| ``` |
| |
| @mark(aAlias, "aAlias") |
| -- aAlias-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 25, |
| "column": 6, |
| "offset": 518 |
| }, |
| "end": { |
| "line": 25, |
| "column": 12, |
| "offset": 524 |
| } |
| }, |
| "description": "```go\ntype aAlias = a.A\n\nfunc (a.A).Hi()\n```\n\n@mark(aAlias, \"aAlias\")" |
| } |
| |
| -- aAlias-hoverdef -- |
| ```go |
| type aAlias = a.A |
| |
| func (a.A).Hi() |
| ``` |
| |
| @mark(aAlias, "aAlias") |
| |
| -- bX-definition -- |
| godef/b/b.go:57:7-8: defined here as ```go |
| const X untyped int = 0 |
| ``` |
| |
| @mark(bX, "X"),godef("X", bX) |
| |
| |
| [`b.X` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#X) |
| -- bX-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 57, |
| "column": 7, |
| "offset": 1225 |
| }, |
| "end": { |
| "line": 57, |
| "column": 8, |
| "offset": 1226 |
| } |
| }, |
| "description": "```go\nconst X untyped int = 0\n```\n\n@mark(bX, \"X\"),godef(\"X\", bX)\n\n\n[`b.X` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#X)" |
| } |
| |
| -- bX-hoverdef -- |
| ```go |
| const X untyped int = 0 |
| ``` |
| |
| @mark(bX, "X"),godef("X", bX) |
| |
| |
| [`b.X` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/godef/b#X) |
| -- myFoo-definition -- |
| godef/b/b.go:4:2-7: defined here as ```go |
| package myFoo ("golang.org/lsptests/foo") |
| ``` |
| |
| [`myFoo` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/foo) |
| -- myFoo-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 4, |
| "column": 2, |
| "offset": 21 |
| }, |
| "end": { |
| "line": 4, |
| "column": 7, |
| "offset": 26 |
| } |
| }, |
| "description": "```go\npackage myFoo (\"golang.org/lsptests/foo\")\n```\n\n[`myFoo` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/foo)" |
| } |
| |
| -- myFoo-hoverdef -- |
| ```go |
| package myFoo ("golang.org/lsptests/foo") |
| ``` |
| |
| [`myFoo` on pkg.go.dev](https://pkg.go.dev/golang.org/lsptests/foo) |