Documentation ¶
Index ¶
- Variables
- func Register(pkgName, ident string, val reflect.Value)
- func RegisterAll(symbols interp.Exports)
- type Info
- type Rewriter
- func (r *Rewriter) FuncDef(pkgPath, setter string) (string, map[string]string, error)
- func (r *Rewriter) Load(paths ...string) error
- func (r *Rewriter) LookupFile(targetFileName string) (*ast.File, *token.FileSet, error)
- func (r *Rewriter) Print(root string) error
- func (r *Rewriter) Rewrite(addPackage bool) error
Constants ¶
This section is empty.
Variables ¶
View Source
var RegisteredSymbols = interp.Exports{}
Functions ¶
func Register ¶
Register records the mappings of exported symbol names to their values within the compiled executable.
func RegisterAll ¶
RegisterAll invokes Register once for each symbol provided in the symbols map.
Types ¶
type Rewriter ¶
type Rewriter struct { Config packages.Config Pkgs []*packages.Package // Keys are PkgPath & setter name. We use PkgPath as the key instead of // a *packages.Package because we need to be able to find this across // different instances of Rewriter, where pointer values will be // different, but package import paths, which are just strings, will be // the same. NewFunc map[string]map[string]*ast.FuncLit // Per-package supplemental information. Used only in initial rewrite. Info map[*packages.Package]*Info }
func (*Rewriter) LookupFile ¶
Click to show internal directories.
Click to hide internal directories.