aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/testdata/godef/a/f.go
blob: 10f88262a81b12ce49e4979d9e33476946631540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Package a is a package for testing go to definition.
package a

import "fmt"

func TypeStuff() { //@Stuff
	var x string

	switch y := interface{}(x).(type) { //@mark(switchY, "y"),godef("y", switchY)
	case int: //@mark(intY, "int")
		fmt.Printf("%v", y) //@hoverdef("y", intY)
	case string: //@mark(stringY, "string")
		fmt.Printf("%v", y) //@hoverdef("y", stringY)
	}

}