program

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCantWire = errors.New(`program: unable to wire`)

Functions

func Generate

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

Generate the program

Types

type Program

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

func New

func New(injector *di.Injector, module *gomod.Module) *Program

func (*Program) GenerateFile

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

func (*Program) Parse

func (p *Program) Parse(ctx context.Context, fsys fs.FS) (*State, error)

type State

type State struct {
	Imports  []*imports.Import
	Flags    map[string]string
	Provider *di.Provider
}

State of the program code

Jump to

Keyboard shortcuts

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