Package analysis performs type and pointer analysis and generates mark-up for the Go source view.
The Run method populates a Result object by running type and (optionally) pointer analysis. The Result object is thread-safe and at all times may be accessed by a serving thread, even as it is progressively populated as analysis facts are derived.
The analysis computes mark-up for the following relations:
IMPORTS: for each ast.ImportSpec, the package that it denotes.
RESOLUTION: for each ast.Ident, its kind and type, and the location of its definition.
METHOD SETS, IMPLEMENTS: for each ast.Ident defining a named type, its method-set, the set of interfaces it implements or is implemented by, and its size/align values.
CALLERS, CALLEES: for each function declaration ('func' token), its callers, and for each call-site ('(' token), its callees.
CALLGRAPH: the package docs include an interactive viewer for the intra-package call graph of "fmt".
CHANNEL PEERS: for each channel operation make/<-/close, the set of other channel ops that alias the same channel(s).
ERRORS: for each locus of a frontend (scanner/parser/type) error, the location is highlighted in red and hover text provides the compiler error message.
// error message. // package analysis // import "golang.org/x/tools/godoc/analysis" import (
// +build go1.5 package analysis // This file computes the CALLERS and CALLEES relations from the call
// +build go1.5 package analysis // This file computes the "implements" relation over all pairs of
analysis is referenced in 11 repositoriesgithub.com/golang/tools
- 3 references in godoc/server.go
- 2 references in cmd/godoc/main.go
- 2 references in godoc/corpus.go
- 1 reference in godoc/analysis/analysis.go
- 1 reference in godoc/analysis/callgraph.go
- 3 references in src/code.google.com/p/go.tools/godoc/server.go
- 3 references in src/golang.org/x/tools/godoc/server.go
- 2 references in src/code.google.com/p/go.tools/cmd/godoc/main.go
- 2 references in src/code.google.com/p/go.tools/godoc/corpus.go
- 2 references in src/golang.org/x/tools/cmd/godoc/main.go