Versions in this module Expand all Collapse all v0 v0.0.1 Apr 20, 2023 Changes in this version + const PromptFile + const ReplacementDelimiter + var IgnoredDirectories = []string + var IgnoredNames = []string + func Apply(inputDir string, vars map[string]string, outputDir string) error + func Create(inputDir string, arguments map[string]string, targetDir string) error + func IsCollection(dir string) (bool, []string) + func NewQuestion(prompt Prompt) survey.Question + func ReadFile(path string) (string, error) + func URLToFs(url string, subPath string, tmpDir string) (string, error) + type Prompt struct + Choices []string + Default string + Name string + Prompt string + Required bool + type Prompts struct + Prompts []Prompt + type SourceFile struct + FileContent string + FileMode fs.FileMode + FilePath string + func (s SourceFile) Replace(vars map[string]string) (SourceFile, error) + func (s SourceFile) Transform(inputDir string, outputDir string, vars map[string]string) error + type Template interface + Arguments func() []Prompt + Ask func(...survey.AskOpt) (map[string]string, error) + func NewTemplate(promptFile io.ReadCloser, arguments map[string]string) (Template, error) + type TemplateImpl struct + TArguments map[string]string + TPrompts Prompts + TQuestions []*survey.Question + func (t TemplateImpl) Arguments() []Prompt + func (t TemplateImpl) Ask(opts ...survey.AskOpt) (map[string]string, error)