godef

package module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2022 License: BSD-3-Clause, MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UseOffset bool
	Context   build.Context
}

func (*Config) Define

func (c *Config) Define(filename string, cursor int, src interface{}) (*Position, []byte, error)

type PathError

type PathError struct {
	Dir     string
	SrcDirs []string
}

func (*PathError) Error

func (p *PathError) Error() string

type Position

type Position struct {
	Filename string // filename, if any
	Offset   int    // offset, starting at 0
	Line     int    // line number, starting at 1
	Column   int    // column number, starting at 1 (character count)
}

func (Position) IsValid

func (p Position) IsValid() bool

func (Position) String

func (p Position) String() string

type Query

type Query struct {
	Mode  string         // query mode ("callers", etc)
	Pos   string         // query position
	Build *build.Context // package loading configuration

	// pointer analysis options
	Scope      []string  // main packages in (*loader.Config).FromArgs syntax
	PTALog     io.Writer // (optional) pointer-analysis log file
	Reflection bool      // model reflection soundly (currently slow).

	// Populated during Run()
	Fset *token.FileSet
	// contains filtered or unexported fields
}

func (*Query) Output

func (q *Query) Output(fset *token.FileSet, res *definitionResult)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL