Documentation ¶
Index ¶
Constants ¶
View Source
const HasAlias = true
Variables ¶
This section is empty.
Functions ¶
func Fprintf ¶
fprintf prints to w a message of the form "location: message\n" where location is derived from pos.
pos must be one of:
- a token.Pos, denoting a position
- an ast.Node, denoting an interval
- anything with a Pos() method: ssa.Member, ssa.Value, ssa.Instruction, types.Object, pointer.Label, etc.
- a QueryPos, denoting the extent of the user's query.
- nil, meaning no position at all.
The output format is is compatible with the 'gnu' compilation-error-regexp in Emacs' compilation mode.
Types ¶
type Query ¶
type Query struct { 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). // result-printing function Output func(*token.FileSet, QueryResult) }
A Query specifies a single guru query.
type QueryResult ¶
type QueryResult interface { // JSON returns the QueryResult in JSON form. JSON(fset *token.FileSet) []byte // PrintPlain prints the QueryResult in plain text form. // The implementation calls printfFunc to print each line of output. PrintPlain(printf printfFunc) }
A QueryResult is an item of output. Each query produces a stream of query results, calling Query.Output for each one.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.