Documentation ¶
Index ¶
- type Generator
- func (g Generator) Debug(templ string, k ...interface{})
- func (g *Generator) ExecuteGoCmd(ctx context.Context, args []string, env []string) error
- func (g *Generator) GenerateAndExecuteFile(ctx context.Context, imports []string, extraStatements string) error
- func (g *Generator) GenerateFile(imports []string, extraStatements, path string) error
- func (g *Generator) GetExports(importName string, files []*ast.File, added map[string]bool) (string, error)
- func (g *Generator) InjectPry(filePath string) (string, error)
- func (g *Generator) RevertPry(modifiedFiles []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
func NewGenerator ¶
func (*Generator) ExecuteGoCmd ¶
ExecuteGoCmd runs the 'go' command with certain parameters.
func (*Generator) GenerateAndExecuteFile ¶
func (g *Generator) GenerateAndExecuteFile(ctx context.Context, imports []string, extraStatements string) error
GenerateAndExecuteFile generates and executes a temp file with the given imports
func (*Generator) GenerateFile ¶
GenerateFile generates a injected file.
func (*Generator) GetExports ¶
func (g *Generator) GetExports(importName string, files []*ast.File, added map[string]bool) (string, error)
GetExports returns a string of gocode that represents the exports (constants/functions) of an ast.Package.
Click to show internal directories.
Click to hide internal directories.