Documentation ¶
Index ¶
- func DefinitionStringFromGopls(definition string) (string, sitter.Point, error)
- func GetFunctionCalls(filepath string, functionName string, code []byte) ([]string, error)
- func GetFunctionDefinition(targetFuncName string, code []byte) (string, error)
- func GetPackageName(code []byte) (string, error)
- type FunctionCallRef
- type FunctionDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefinitionStringFromGopls ¶
DefinitionStringFromGopls accepts the output from a gopls definition command and returns only the file path and line number e.g. "'/Users/osilkin/Programming/playground/go-create-test/example/test.go:8:6-14: defined here as func fortnite() string" becomes "/Users/osilkin/Programming/playground/go-create-test/example/test.go:8:6-14"
func GetFunctionCalls ¶
GetFunctionCalls takes a given function name and file to look at, then returns the definitions of all of the symbols referred to by that function.
func GetFunctionDefinition ¶
GetFunctionDefinition Returns the definition of a given function within a given file.
func GetPackageName ¶
GetPackageName Queries the given file for the package name.
Types ¶
type FunctionDefinition ¶
Click to show internal directories.
Click to hide internal directories.