generate

package
v0.0.0-...-aa98bae Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(ctx context.Context, pkgs []*packages.Package) <-chan Wrapper

func LoadPackages

func LoadPackages(patterns []string) ([]*packages.Package, error)

func NewFile

func NewFile(syntax SyntaxTree) (*ast.File, bool)

func NewFuncBody

func NewFuncBody(fdecl *ast.FuncDecl, pkgName string) ast.Stmt

func NewFuncDecl

func NewFuncDecl(decl *ast.FuncDecl) (wrapped *ast.FuncDecl, ok bool)

func NewMethodBody

func NewMethodBody(fdecl *ast.FuncDecl) ast.Stmt

func NewMethodDecl

func NewMethodDecl(fdecl *ast.FuncDecl) (wrapped *ast.FuncDecl, ok bool)

Types

type SyntaxTree

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

type Wrapper

type Wrapper struct {
	Name string
	File *ast.File
}

Jump to

Keyboard shortcuts

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