File: casesensitive.txt

package info (click to toggle)
golang-golang-x-tools 1%3A0.25.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 22,724 kB
  • sloc: javascript: 2,027; asm: 1,645; sh: 166; yacc: 155; makefile: 49; ansic: 8
file content (116 lines) | stat: -rw-r--r-- 2,871 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
This file contains tests for symbol matches using the casesensitive matcher.

For historical reasons, it also verifies general behavior of the symbol search.

-- settings.json --
{
	"symbolMatcher": "casesensitive"
}

-- go.mod --
module mod.test/casesensitive

go 1.18

-- main.go --
package main

//@workspacesymbol("main.main", main)
//@workspacesymbol("p.Message", Message)
//@workspacesymbol("main.myvar", myvar)
//@workspacesymbol("main.myType", myType)
//@workspacesymbol("main.myType.Blahblah", blahblah)
//@workspacesymbol("main.myStruct", myStruct)
//@workspacesymbol("main.myStruct.myStructField", myStructField)
//@workspacesymbol("main.myInterface", myInterface)
//@workspacesymbol("main.myInterface.DoSomeCoolStuff", DoSomeCoolStuff)
//@workspacesymbol("main.embed.myStruct", embeddedStruct)
//@workspacesymbol("main.embed.nestedStruct.nestedStruct2.int", int)
//@workspacesymbol("main.embed.nestedInterface.myInterface", nestedInterface)
//@workspacesymbol("main.embed.nestedInterface.nestedMethod", nestedMethod)
//@workspacesymbol("dunk", dunk)
//@workspacesymbol("Dunk", Dunk)

import (
	"encoding/json"
	"fmt"
)

func main() { // function
	fmt.Println("Hello")
}

var myvar int // variable

type myType string // basic type

type myDecoder json.Decoder // to use the encoding/json import

func (m *myType) Blahblah() {} // method

type myStruct struct { // struct type
	myStructField int // struct field
}

type myInterface interface { // interface
	DoSomeCoolStuff() string // interface method
}

type embed struct {
	myStruct

	nestedStruct struct {
		nestedField int

		nestedStruct2 struct {
			int
		}
	}

	nestedInterface interface {
		myInterface
		nestedMethod()
	}
}

func Dunk() int { return 0 }

func dunk() {}

-- p/p.go --
package p

const Message = "Hello World." // constant
-- @DoSomeCoolStuff --
main.go:41:2-17 main.myInterface.DoSomeCoolStuff Method
-- @Dunk --
main.go:61:6-10 Dunk Function
-- @Message --
p/p.go:3:7-14 p.Message Constant
-- @blahblah --
main.go:34:18-26 main.myType.Blahblah Method
-- @dunk --
main.go:63:6-10 dunk Function
-- @int --
main.go:51:4-7 main.embed.nestedStruct.nestedStruct2.int Field
-- @main --
main.go:24:6-10 main.main Function
-- @myInterface --
main.go:40:6-17 main.myInterface Interface
main.go:41:2-17 main.myInterface.DoSomeCoolStuff Method
-- @myStruct --
main.go:36:6-14 main.myStruct Struct
main.go:37:2-15 main.myStruct.myStructField Field
-- @myStructField --
main.go:37:2-15 main.myStruct.myStructField Field
-- @myType --
main.go:30:6-12 main.myType Class
main.go:34:18-26 main.myType.Blahblah Method
-- @myvar --
main.go:28:5-10 main.myvar Variable
-- @nestedInterface --
main.go:56:3-14 main.embed.nestedInterface.myInterface Interface
-- @nestedMethod --
main.go:57:3-15 main.embed.nestedInterface.nestedMethod Method
-- @embeddedStruct --
main.go:45:2-10 main.embed.myStruct Field