Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/gopls: typeDefinition should support jumping to type of function/method's single return value? #38589
What version of Go are you using (
Consider the case:
type myFunc func(int) string var foo myFunc bar := foo()
If you run go-to-type-definition on "foo()" it should take you to the myFunc definition, not the "string" return value.
Most go-to-thingy commands operate on an identifier, not an expression, so this behavior would be inconsistent.