Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MLnone file does not have a mode line. MLnone = iota // MLrender file mode line instruction to render. MLrender // MLnorender file mode line instruction not to render. MLnorender )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Checkvars *checkvars.Check // Not required
Client *client.Client `validate:"required"`
Config *config.File `validate:"required"`
Errs *errs.Handler `validate:"required"`
Exit *exit.Handler `validate:"required"`
Log logger.OutputIface `validate:"required"`
NoUnset bool // No unset variables
NoEmpty bool // No empty variables
RenderCurrent string `validate:"required"`
RenderersAvail map[string]renderer.Renderer `validate:"required"`
Stderr io.Writer `validate:"required"`
Stdout io.Writer `validate:"required"`
TemplateDir string `validate:"required"`
Variables *variables.Variables // Not required
ModeLineLen uint8
}
Options options to constructor
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template the template itself
func (*Template) SetSrc ¶
SetSrc sets the source template "name". "name" is defined in *config.Config.TemplateURLs. *config.Config is provided as an Option to New.
func (*Template) SetSrcDest ¶
SetSrcDest sets the source template and destination path where the project structure will reside.
type TemplateIface ¶
type TemplateIface interface {
// SetRender set rendering engine
SetRender(renderer string)
SetVars(vars *variables.Variables)
// SetSrcDest sets the source template and destination path where the project structure
// will reside.
SetSrcDest(src, dest string)
// SetSrc sets the source template "name". "name" is defined
// in *config.Config.TemplateURLs. *config.Config is provided as an Option to New.
SetSrc(name string)
// SetDest sets the destination path
SetDest(dest string)
// Run generates the target directory structure
Run() int
}
TemplateIface ...
Click to show internal directories.
Click to hide internal directories.