mirror of
https://github.com/golang/go
synced 2024-11-19 12:24:42 -07:00
e461004dd0
Change-Id: Ic0c497f4b1644f915db850be3fbacda8e2f85e9a Reviewed-on: https://go-review.googlesource.com/c/tools/+/197818 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
291 lines
5.5 KiB
Plaintext
291 lines
5.5 KiB
Plaintext
-- A-definition --
|
|
godef/a/a.go:7:6-7: defined here as A string //@A
|
|
-- A-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/a/a.go",
|
|
"start": {
|
|
"line": 7,
|
|
"column": 6,
|
|
"offset": 75
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 7,
|
|
"offset": 76
|
|
}
|
|
},
|
|
"description": "A string //@A"
|
|
}
|
|
|
|
-- A-hover --
|
|
A string //@A
|
|
|
|
-- AImport-definition --
|
|
godef/b/b.go:5:2: defined here as package a ("golang.org/x/tools/internal/lsp/godef/a")
|
|
-- AImport-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 5,
|
|
"column": 2,
|
|
"offset": 137
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 2,
|
|
"offset": 137
|
|
}
|
|
},
|
|
"description": "package a (\"golang.org/x/tools/internal/lsp/godef/a\")"
|
|
}
|
|
|
|
-- AImport-hover --
|
|
package a ("golang.org/x/tools/internal/lsp/godef/a")
|
|
-- PackageFoo-definition --
|
|
foo/foo.go:1:1-30:16: defined here as myFoo "golang.org/x/tools/internal/lsp/foo" //@mark(myFoo, "myFoo"),godef("foo", PackageFoo),godef("myFoo", myFoo)
|
|
-- PackageFoo-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://foo/foo.go",
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 30,
|
|
"column": 16,
|
|
"offset": 844
|
|
}
|
|
},
|
|
"description": "myFoo \"golang.org/x/tools/internal/lsp/foo\" //@mark(myFoo, \"myFoo\"),godef(\"foo\", PackageFoo),godef(\"myFoo\", myFoo)"
|
|
}
|
|
|
|
-- PackageFoo-hover --
|
|
myFoo "golang.org/x/tools/internal/lsp/foo" //@mark(myFoo, "myFoo"),godef("foo", PackageFoo),godef("myFoo", myFoo)
|
|
|
|
-- S1-definition --
|
|
godef/b/b.go:8:6-8: defined here as S1 struct {
|
|
F1 int //@mark(S1F1, "F1")
|
|
S2 //@godef("S2", S2), mark(S1S2, "S2")
|
|
a.A //@godef("A", A)
|
|
}
|
|
-- S1-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 8,
|
|
"column": 6,
|
|
"offset": 212
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 8,
|
|
"offset": 214
|
|
}
|
|
},
|
|
"description": "S1 struct {\n\tF1 int //@mark(S1F1, \"F1\")\n\tS2 //@godef(\"S2\", S2), mark(S1S2, \"S2\")\n\ta.A //@godef(\"A\", A)\n}"
|
|
}
|
|
|
|
-- S1-hover --
|
|
S1 struct {
|
|
F1 int //@mark(S1F1, "F1")
|
|
S2 //@godef("S2", S2), mark(S1S2, "S2")
|
|
a.A //@godef("A", A)
|
|
}
|
|
-- S1F1-definition --
|
|
godef/b/b.go:9:2-4: defined here as @mark(S1F1, "F1")
|
|
field F1 int
|
|
-- S1F1-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 9,
|
|
"column": 2,
|
|
"offset": 231
|
|
},
|
|
"end": {
|
|
"line": 9,
|
|
"column": 4,
|
|
"offset": 233
|
|
}
|
|
},
|
|
"description": "@mark(S1F1, \"F1\")\nfield F1 int"
|
|
}
|
|
|
|
-- S1F1-hover --
|
|
@mark(S1F1, "F1")
|
|
field F1 int
|
|
-- S1S2-definition --
|
|
godef/b/b.go:10:2-4: defined here as @godef("S2", S2), mark(S1S2, "S2")
|
|
field S2 S2
|
|
-- S1S2-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 10,
|
|
"column": 2,
|
|
"offset": 260
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 4,
|
|
"offset": 262
|
|
}
|
|
},
|
|
"description": "@godef(\"S2\", S2), mark(S1S2, \"S2\")\nfield S2 S2"
|
|
}
|
|
|
|
-- S1S2-hover --
|
|
@godef("S2", S2), mark(S1S2, "S2")
|
|
field S2 S2
|
|
-- S2-definition --
|
|
godef/b/b.go:14:6-8: defined here as S2 struct {
|
|
F1 string //@mark(S2F1, "F1")
|
|
F2 int //@mark(S2F2, "F2")
|
|
*a.A //@godef("A", A),godef("a",AImport)
|
|
}
|
|
-- S2-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 14,
|
|
"column": 6,
|
|
"offset": 339
|
|
},
|
|
"end": {
|
|
"line": 14,
|
|
"column": 8,
|
|
"offset": 341
|
|
}
|
|
},
|
|
"description": "S2 struct {\n\tF1 string //@mark(S2F1, \"F1\")\n\tF2 int //@mark(S2F2, \"F2\")\n\t*a.A //@godef(\"A\", A),godef(\"a\",AImport)\n}"
|
|
}
|
|
|
|
-- S2-hover --
|
|
S2 struct {
|
|
F1 string //@mark(S2F1, "F1")
|
|
F2 int //@mark(S2F2, "F2")
|
|
*a.A //@godef("A", A),godef("a",AImport)
|
|
}
|
|
-- S2F1-definition --
|
|
godef/b/b.go:15:2-4: defined here as @mark(S2F1, "F1")
|
|
field F1 string
|
|
-- S2F1-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 15,
|
|
"column": 2,
|
|
"offset": 358
|
|
},
|
|
"end": {
|
|
"line": 15,
|
|
"column": 4,
|
|
"offset": 360
|
|
}
|
|
},
|
|
"description": "@mark(S2F1, \"F1\")\nfield F1 string"
|
|
}
|
|
|
|
-- S2F1-hover --
|
|
@mark(S2F1, "F1")
|
|
field F1 string
|
|
-- S2F2-definition --
|
|
godef/b/b.go:16:2-4: defined here as @mark(S2F2, "F2")
|
|
field F2 int
|
|
-- S2F2-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 16,
|
|
"column": 2,
|
|
"offset": 391
|
|
},
|
|
"end": {
|
|
"line": 16,
|
|
"column": 4,
|
|
"offset": 393
|
|
}
|
|
},
|
|
"description": "@mark(S2F2, \"F2\")\nfield F2 int"
|
|
}
|
|
|
|
-- S2F2-hover --
|
|
@mark(S2F2, "F2")
|
|
field F2 int
|
|
-- Stuff-definition --
|
|
godef/a/a.go:9:6-11: defined here as func a.Stuff()
|
|
-- Stuff-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/a/a.go",
|
|
"start": {
|
|
"line": 9,
|
|
"column": 6,
|
|
"offset": 95
|
|
},
|
|
"end": {
|
|
"line": 9,
|
|
"column": 11,
|
|
"offset": 100
|
|
}
|
|
},
|
|
"description": "func a.Stuff()"
|
|
}
|
|
|
|
-- Stuff-hover --
|
|
func a.Stuff()
|
|
-- X-definition --
|
|
godef/b/b.go:37:7-8: defined here as const X untyped int = 0
|
|
-- X-definition-json --
|
|
{
|
|
"span": {
|
|
"uri": "file://godef/b/b.go",
|
|
"start": {
|
|
"line": 37,
|
|
"column": 7,
|
|
"offset": 812
|
|
},
|
|
"end": {
|
|
"line": 37,
|
|
"column": 8,
|
|
"offset": 813
|
|
}
|
|
},
|
|
"description": "const X untyped int = 0"
|
|
}
|
|
|
|
-- X-hover --
|
|
const X untyped int = 0
|
|
-- myFoo-definition --
|
|
godef/b/b.go:4:2-7: defined here as package myFoo ("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": "package myFoo (\"golang.org/x/tools/internal/lsp/foo\")"
|
|
}
|
|
|
|
-- myFoo-hover --
|
|
package myFoo ("golang.org/x/tools/internal/lsp/foo")
|