inject

package
v0.0.0-...-75916e0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const INJECT = `
package main

//import "fmt"

func a(){
	__traceStack()
}
`

Variables

This section is empty.

Functions

This section is empty.

Types

type DogHelper

type DogHelper struct {
	// contains filtered or unexported fields
}

func NewDogHelper

func NewDogHelper(path, pkg string) *DogHelper

func (*DogHelper) EraseDogHelper

func (d *DogHelper) EraseDogHelper() error

func (*DogHelper) WriteDogHelper

func (d *DogHelper) WriteDogHelper()

type Injector

type Injector struct {
	MyImport *ast.ImportSpec
	Mystate  ast.Stmt
}

func NewInjector

func NewInjector() *Injector

func (*Injector) InjectFile

func (i *Injector) InjectFile(path string) error

func (*Injector) InjectFunc

func (i *Injector) InjectFunc(f ast.Decl) error

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(tokenFS *token.FileSet, fn string) *Parser

func (*Parser) ForEachDecl

func (p *Parser) ForEachDecl(f func(ast.Decl))

func (*Parser) GetAst

func (p *Parser) GetAst() *ast.File

func (*Parser) Parse

func (p *Parser) Parse() error

func (*Parser) PkgName

func (p *Parser) PkgName() string

Jump to

Keyboard shortcuts

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