xgenny

package
v0.0.0-...-7149754 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Box

func Box(g *genny.Generator, box packd.Walker) error

Box will mount each file in the Box and wrap it, already existing files are ignored

func DryRunner

func DryRunner(ctx context.Context) *genny.Runner

DryRunner is a genny DryRunner with a logger

Types

type SourceModification

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

SourceModification describes modified and created files in the source code after a run

func NewSourceModification

func NewSourceModification() SourceModification

func RunWithValidation

func RunWithValidation(
	tracer *placeholder.Tracer,
	gens ...*genny.Generator,
) (sm SourceModification, err error)

RunWithValidation checks the generators with a dry run and then execute the wet runner to the generators

func (*SourceModification) AppendCreatedFiles

func (sm *SourceModification) AppendCreatedFiles(createdFiles ...string)

AppendCreatedFiles appends a created files in the source modification that are not already documented

func (*SourceModification) AppendModifiedFiles

func (sm *SourceModification) AppendModifiedFiles(modifiedFiles ...string)

AppendModifiedFiles appends modified files in the source modification that are not already documented

func (SourceModification) CreatedFiles

func (sm SourceModification) CreatedFiles() (createdFiles []string)

CreatedFiles returns the created files of the source modification

func (*SourceModification) Merge

func (sm *SourceModification) Merge(newSm SourceModification)

Merge merges new source modification to an existing one

func (SourceModification) ModifiedFiles

func (sm SourceModification) ModifiedFiles() (modifiedFiles []string)

ModifiedFiles returns the modified files of the source modification

type Walker

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

Walker implements packd.Walker for Go embed's fs.FS.

func NewEmbedWalker

func NewEmbedWalker(fs embed.FS, trimPrefix, path string) Walker

NewEmbedWalker returns a new Walker for fs. trimPrefix is used to trim parent paths from the paths of found files.

func (Walker) Walk

func (w Walker) Walk(wl packd.WalkFunc) error

Walk implements packd.Walker.

Jump to

Keyboard shortcuts

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