generator

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathExists

func PathExists(path string) (bool, error)

Types

type Generator

type Generator struct {
	Parser *parser.Parser

	File *parser.File
	Pkg  *parser.Package
	// contains filtered or unexported fields
}

func (*Generator) Bytes

func (g *Generator) Bytes() []byte

Bytes return the generated bytes

func (*Generator) Format

func (g *Generator) Format() ([]byte, error)

format returns the gofmt-ed contents of the Generator's buffer.

func (*Generator) GetExprString

func (g *Generator) GetExprString(expr ast.Expr) string

func (*Generator) GetExprValueString

func (g *Generator) GetExprValueString(expr ast.Expr) string

func (*Generator) Output

func (g *Generator) Output(output string)

func (*Generator) Prepare

func (g *Generator) Prepare(dir string, files []string, output string)

func (*Generator) PrepareImports

func (g *Generator) PrepareImports(imports map[string]string)

func (*Generator) PreparePackage

func (g *Generator) PreparePackage(dir string, output string)

func (*Generator) PrepareParser

func (g *Generator) PrepareParser()

func (*Generator) PrepareWithFile

func (g *Generator) PrepareWithFile(fileName string, output string)

func (*Generator) ReduceType

func (g *Generator) ReduceType(expr ast.Expr) parser.Type

func (*Generator) ReduceTypeSrc

func (g *Generator) ReduceTypeSrc(src string) parser.Type

func (*Generator) WorkFile

func (g *Generator) WorkFile() *parser.File

Jump to

Keyboard shortcuts

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