generator

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(state *State) ([]byte, error)

Types

type Gen

type Gen struct {
	Import *imports.Import
	Path   string
	Pascal string
}

type Generator

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

func New

func New(module *gomod.Module, parser *parser.Parser) *Generator

func (*Generator) GenerateFile

func (g *Generator) GenerateFile(ctx context.Context, fsys overlay.F, file *overlay.File) error

type State

type State struct {
	Imports    []*imports.Import
	Generators []*Gen
}

func Load

func Load(fsys fs.FS, module *gomod.Module, parser *parser.Parser) (*State, error)

Jump to

Keyboard shortcuts

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