xgenny

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 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 added in v0.19.0

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 added in v0.16.0

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

DryRunner is a genny DryRunner with a logger

Types

type SourceModification added in v0.17.0

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

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

func NewSourceModification added in v0.17.0

func NewSourceModification() SourceModification

func RunWithValidation added in v0.16.0

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 added in v0.17.0

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

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

func (*SourceModification) AppendModifiedFiles added in v0.17.0

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

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

func (SourceModification) CreatedFiles added in v0.17.0

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

CreatedFiles returns the created files of the source modification

func (*SourceModification) Merge added in v0.17.0

func (sm *SourceModification) Merge(newSm SourceModification)

Merge merges new source modification to an existing one

func (SourceModification) ModifiedFiles added in v0.17.0

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