| -- AB-hover -- |
| ```go |
| func (a.I).B() |
| ``` |
| |
| [`(a.I).B` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#I.B) |
| |
| \@mark\(AB, \"B\"\) |
| -- AField-hover -- |
| ```go |
| field Field int |
| ``` |
| |
| [`(a.S).Field` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#S.Field) |
| |
| \@mark\(AField, \"Field\"\) |
| -- AField2-hover -- |
| ```go |
| field Field2 int |
| ``` |
| |
| [`(a.R).Field2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#R.Field2) |
| |
| \@mark\(AField2, \"Field2\"\) |
| -- AGoodbye-hover -- |
| ```go |
| func (a.H).Goodbye() |
| ``` |
| |
| [`(a.H).Goodbye` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#H.Goodbye) |
| |
| \@mark\(AGoodbye, \"Goodbye\"\) |
| -- AHello-hover -- |
| ```go |
| func (a.J).Hello() |
| ``` |
| |
| [`(a.J).Hello` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#J.Hello) |
| |
| \@mark\(AHello, \"Hello\"\) |
| -- AHey-hover -- |
| ```go |
| func (a.R).Hey() |
| ``` |
| |
| [`(a.R).Hey` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#R.Hey) |
| -- AHi-hover -- |
| ```go |
| func (a.A).Hi() |
| ``` |
| |
| [`(a.A).Hi` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#A.Hi) |
| -- AImport-definition -- |
| godef/b/b.go:5:2-43: defined here as ```go |
| package a ("golang.org/x/tools/internal/lsp/godef/a") |
| ``` |
| |
| [`a` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a) |
| -- AImport-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 5, |
| "column": 2, |
| "offset": 112 |
| }, |
| "end": { |
| "line": 5, |
| "column": 43, |
| "offset": 153 |
| } |
| }, |
| "description": "```go\npackage a (\"golang.org/x/tools/internal/lsp/godef/a\")\n```\n\n[`a` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a)" |
| } |
| |
| -- AImport-hover -- |
| ```go |
| package a ("golang.org/x/tools/internal/lsp/godef/a") |
| ``` |
| |
| [`a` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a) |
| -- AString-definition -- |
| godef/a/a.go:26:6-7: defined here as ```go |
| type A string //@mark(AString, "A") |
| |
| ``` |
| |
| [`a.A` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#A) |
| -- AString-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/a/a.go", |
| "start": { |
| "line": 26, |
| "column": 6, |
| "offset": 452 |
| }, |
| "end": { |
| "line": 26, |
| "column": 7, |
| "offset": 453 |
| } |
| }, |
| "description": "```go\ntype A string //@mark(AString, \"A\")\n\n```\n\n[`a.A` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#A)" |
| } |
| |
| -- AString-hover -- |
| ```go |
| type A string //@mark(AString, "A") |
| |
| ``` |
| |
| [`a.A` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/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/x/tools/internal/lsp/godef/a#AStuff) |
| -- AStuff-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/a/a.go", |
| "start": { |
| "line": 28, |
| "column": 6, |
| "offset": 489 |
| }, |
| "end": { |
| "line": 28, |
| "column": 12, |
| "offset": 495 |
| } |
| }, |
| "description": "```go\nfunc a.AStuff()\n```\n\n[`a.AStuff` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#AStuff)" |
| } |
| |
| -- AStuff-hover -- |
| ```go |
| func a.AStuff() |
| ``` |
| |
| [`a.AStuff` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#AStuff) |
| -- S1-definition -- |
| godef/b/b.go:25: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) |
| } |
| ``` |
| |
| [`b.S1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1) |
| -- S1-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 25, |
| "column": 6, |
| "offset": 521 |
| }, |
| "end": { |
| "line": 25, |
| "column": 8, |
| "offset": 523 |
| } |
| }, |
| "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}\n```\n\n[`b.S1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1)" |
| } |
| |
| -- S1-hover -- |
| ```go |
| type S1 struct { |
| F1 int //@mark(S1F1, "F1") |
| S2 //@godef("S2", S2),mark(S1S2, "S2") |
| a.A //@godef("A", AString) |
| } |
| ``` |
| |
| [`b.S1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1) |
| -- S1F1-definition -- |
| godef/b/b.go:26:2-4: defined here as ```go |
| field F1 int |
| ``` |
| |
| [`(b.S1).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1.F1) |
| |
| \@mark\(S1F1, \"F1\"\) |
| -- S1F1-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 26, |
| "column": 2, |
| "offset": 540 |
| }, |
| "end": { |
| "line": 26, |
| "column": 4, |
| "offset": 542 |
| } |
| }, |
| "description": "```go\nfield F1 int\n```\n\n[`(b.S1).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1.F1)\n\n\\@mark\\(S1F1, \\\"F1\\\"\\)" |
| } |
| |
| -- S1F1-hover -- |
| ```go |
| field F1 int |
| ``` |
| |
| [`(b.S1).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1.F1) |
| |
| \@mark\(S1F1, \"F1\"\) |
| -- S1S2-definition -- |
| godef/b/b.go:27:2-4: defined here as ```go |
| field S2 S2 |
| ``` |
| |
| [`(b.S1).S2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1.S2) |
| |
| \@godef\(\"S2\", S2\),mark\(S1S2, \"S2\"\) |
| -- S1S2-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 27, |
| "column": 2, |
| "offset": 569 |
| }, |
| "end": { |
| "line": 27, |
| "column": 4, |
| "offset": 571 |
| } |
| }, |
| "description": "```go\nfield S2 S2\n```\n\n[`(b.S1).S2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1.S2)\n\n\\@godef\\(\\\"S2\\\", S2\\),mark\\(S1S2, \\\"S2\\\"\\)" |
| } |
| |
| -- S1S2-hover -- |
| ```go |
| field S2 S2 |
| ``` |
| |
| [`(b.S1).S2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S1.S2) |
| |
| \@godef\(\"S2\", S2\),mark\(S1S2, \"S2\"\) |
| -- S2-definition -- |
| godef/b/b.go:31: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/x/tools/internal/lsp/godef/b#S2) |
| -- S2-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 31, |
| "column": 6, |
| "offset": 653 |
| }, |
| "end": { |
| "line": 31, |
| "column": 8, |
| "offset": 655 |
| } |
| }, |
| "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/x/tools/internal/lsp/godef/b#S2)" |
| } |
| |
| -- S2-hover -- |
| ```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/x/tools/internal/lsp/godef/b#S2) |
| -- S2F1-definition -- |
| godef/b/b.go:32:2-4: defined here as ```go |
| field F1 string |
| ``` |
| |
| [`(b.S2).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S2.F1) |
| |
| \@mark\(S2F1, \"F1\"\) |
| -- S2F1-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 32, |
| "column": 2, |
| "offset": 672 |
| }, |
| "end": { |
| "line": 32, |
| "column": 4, |
| "offset": 674 |
| } |
| }, |
| "description": "```go\nfield F1 string\n```\n\n[`(b.S2).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S2.F1)\n\n\\@mark\\(S2F1, \\\"F1\\\"\\)" |
| } |
| |
| -- S2F1-hover -- |
| ```go |
| field F1 string |
| ``` |
| |
| [`(b.S2).F1` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S2.F1) |
| |
| \@mark\(S2F1, \"F1\"\) |
| -- S2F2-definition -- |
| godef/b/b.go:33:2-4: defined here as ```go |
| field F2 int |
| ``` |
| |
| [`(b.S2).F2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S2.F2) |
| |
| \@mark\(S2F2, \"F2\"\) |
| -- S2F2-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 33, |
| "column": 2, |
| "offset": 705 |
| }, |
| "end": { |
| "line": 33, |
| "column": 4, |
| "offset": 707 |
| } |
| }, |
| "description": "```go\nfield F2 int\n```\n\n[`(b.S2).F2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S2.F2)\n\n\\@mark\\(S2F2, \\\"F2\\\"\\)" |
| } |
| |
| -- S2F2-hover -- |
| ```go |
| field F2 int |
| ``` |
| |
| [`(b.S2).F2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#S2.F2) |
| |
| \@mark\(S2F2, \"F2\"\) |
| -- bX-definition -- |
| godef/b/b.go:54:7-8: defined here as ```go |
| const X untyped int = 0 |
| ``` |
| |
| [`b.X` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#X) |
| |
| \@mark\(bX, \"X\"\),godef\(\"X\", bX\) |
| -- bX-definition-json -- |
| { |
| "span": { |
| "uri": "file://godef/b/b.go", |
| "start": { |
| "line": 54, |
| "column": 7, |
| "offset": 1140 |
| }, |
| "end": { |
| "line": 54, |
| "column": 8, |
| "offset": 1141 |
| } |
| }, |
| "description": "```go\nconst X untyped int = 0\n```\n\n[`b.X` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#X)\n\n\\@mark\\(bX, \\\"X\\\"\\),godef\\(\\\"X\\\", bX\\)" |
| } |
| |
| -- bX-hover -- |
| ```go |
| const X untyped int = 0 |
| ``` |
| |
| [`b.X` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/b#X) |
| |
| \@mark\(bX, \"X\"\),godef\(\"X\", bX\) |
| -- myFoo-definition -- |
| godef/b/b.go:4:2-7: defined here as ```go |
| package myFoo ("golang.org/x/tools/internal/lsp/foo") |
| ``` |
| |
| [`myFoo` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/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/x/tools/internal/lsp/foo\")\n```\n\n[`myFoo` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/foo)" |
| } |
| |
| -- myFoo-hover -- |
| ```go |
| package myFoo ("golang.org/x/tools/internal/lsp/foo") |
| ``` |
| |
| [`myFoo` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/foo) |