Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201105173854-bc9fc8d8c4bc / internal / lsp / testdata / symbols / main.go
1 package main
2
3 import (
4         "io"
5 )
6
7 var _ = 1
8
9 var x = 42 //@mark(symbolsx, "x"), symbol("x", "x", "Variable", "", "main.x")
10
11 const y = 43 //@symbol("y", "y", "Constant", "", "main.y")
12
13 type Number int //@symbol("Number", "Number", "Number", "", "main.Number")
14
15 type Alias = string //@symbol("Alias", "Alias", "String", "", "main.Alias")
16
17 type NumberAlias = Number //@symbol("NumberAlias", "NumberAlias", "Number", "", "main.NumberAlias")
18
19 type (
20         Boolean   bool   //@symbol("Boolean", "Boolean", "Boolean", "", "main.Boolean")
21         BoolAlias = bool //@symbol("BoolAlias", "BoolAlias", "Boolean", "", "main.BoolAlias")
22 )
23
24 type Foo struct { //@mark(symbolsFoo, "Foo"), symbol("Foo", "Foo", "Struct", "", "main.Foo")
25         Quux           //@mark(fQuux, "Quux"), symbol("Quux", "Quux", "Field", "Foo", "main.Foo.Quux")
26         W    io.Writer //@symbol("W" , "W", "Field", "Foo", "main.Foo.W")
27         Bar  int       //@mark(fBar, "Bar"), symbol("Bar", "Bar", "Field", "Foo", "main.Foo.Bar")
28         baz  string    //@symbol("baz", "baz", "Field", "Foo", "main.Foo.baz")
29 }
30
31 type Quux struct { //@symbol("Quux", "Quux", "Struct", "", "main.Quux")
32         X, Y float64 //@mark(qX, "X"), symbol("X", "X", "Field", "Quux", "main.X"), symbol("Y", "Y", "Field", "Quux", "main.Y")
33 }
34
35 func (f Foo) Baz() string { //@symbol("(Foo).Baz", "Baz", "Method", "", "main.Foo.Baz")
36         return f.baz
37 }
38
39 func _() {}
40
41 func (q *Quux) Do() {} //@mark(qDo, "Do"), symbol("(*Quux).Do", "Do", "Method", "", "main.Quux.Do")
42
43 func main() { //@symbol("main", "main", "Function", "", "main.main")
44
45 }
46
47 type Stringer interface { //@symbol("Stringer", "Stringer", "Interface", "", "main.Stringer")
48         String() string //@symbol("String", "String", "Method", "Stringer", "main.Stringer.String")
49 }
50
51 type ABer interface { //@mark(ABerInterface, "ABer"), symbol("ABer", "ABer", "Interface", "", "main.ABer")
52         B()        //@symbol("B", "B", "Method", "ABer", "main.ABer.B")
53         A() string //@mark(ABerA, "A"), symbol("A", "A", "Method", "ABer", "main.ABer.A")
54 }
55
56 type WithEmbeddeds interface { //@symbol("WithEmbeddeds", "WithEmbeddeds", "Interface", "", "main.WithEmbeddeds")
57         Do()      //@symbol("Do", "Do", "Method", "WithEmbeddeds", "main.WithEmbeddeds.Do")
58         ABer      //@symbol("ABer", "ABer", "Interface", "WithEmbeddeds", "main.WithEmbeddeds.ABer")
59         io.Writer //@mark(ioWriter, "io.Writer"), symbol("io.Writer", "io.Writer", "Interface", "WithEmbeddeds", "main.WithEmbeddeds.Writer")
60 }
61
62 func Dunk() int { return 0 } //@symbol("Dunk", "Dunk", "Function", "", "main.Dunk")
63
64 func dunk() {} //@symbol("dunk", "dunk", "Function", "", "main.dunk")