view

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

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

Generate the view from state

Types

type Generator

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

func New

func New(module *gomod.Module, transform *transformrt.Map, flag *framework.Flag) *Generator

func (*Generator) GenerateFile

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

type State

type State struct {
	Imports []*imports.Import
	Flag    *framework.Flag
	Embeds  []*embed.File
}

func Load

func Load(
	ctx context.Context,
	fsys fs.FS,
	module *gomod.Module,
	transform *transformrt.Map,
	flag *framework.Flag,
) (*State, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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