Documentation ¶
Index ¶
- func Box(g *genny.Generator, box packd.Walker) error
- func Transformer(ctx *plush.Context) genny.Transformer
- type Runner
- type SourceModification
- func (sm *SourceModification) AppendCreatedFiles(createdFiles ...string)
- func (sm *SourceModification) AppendModifiedFiles(modifiedFiles ...string)
- func (sm SourceModification) CreatedFiles() (createdFiles []string)
- func (sm *SourceModification) Merge(newSm SourceModification)
- func (sm SourceModification) ModifiedFiles() (modifiedFiles []string)
- func (sm *SourceModification) String() (string, error)
- type Walker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transformer ¶
func Transformer(ctx *plush.Context) genny.Transformer
Transformer will plush-ify any file that has a ".plush" extension.
Types ¶
type Runner ¶
type Runner struct { *genny.Runner // contains filtered or unexported fields }
func (*Runner) ApplyModifications ¶
func (r *Runner) ApplyModifications() (SourceModification, error)
ApplyModifications copy all modifications from the temporary folder to the target path.
func (*Runner) Run ¶
Run all generators into a temp folder for we can apply the modifications later.
func (*Runner) RunAndApply ¶
func (r *Runner) RunAndApply(gens ...*genny.Generator) (SourceModification, error)
RunAndApply run the generators and apply the modifications to the target path.
func (*Runner) Tracer ¶
func (r *Runner) Tracer() *placeholder.Tracer
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 (*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.
func (*SourceModification) String ¶
func (sm *SourceModification) String() (string, error)
String convert to string value.
type Walker ¶
type Walker struct {
// contains filtered or unexported fields
}
Walker implements packd.Walker for Go embed's fs.FS.
func NewEmbedWalker ¶
NewEmbedWalker returns a new Walker for fs. trimPrefix is used to trim parent paths from the paths of found files.