Versions in this module Expand all Collapse all v0 v0.0.2 Aug 7, 2026 Changes in this version + func HasHooks(t *Template) bool + func RunPostHook(ctx context.Context, t *Template, values map[string]any, dir string, ...) error + func RunPreHook(ctx context.Context, t *Template, values map[string]any, dir string, ...) error + func UnwrapValue(v params.Value) any + type Author struct + Email string + Name string + URL string + type DestAction int + const DestCancel + const DestPin + const DestReuse + const DestWipe + type HookOptions struct + NoHooks bool + Output io.Writer + PrintCommands bool + StepStart func(kind, cmd string) + Verbose bool + type HookView struct + File string + IsFile bool + Phase string + Run string + func CollectHooks(t *Template) []HookView + type IncludeRule struct + If string + Path string + type Loader struct + CacheDir string + PromptExistingDest func(name, localPath string) (DestAction, error) + PromptInvalidPinned func(name, localPath string, detectErr error) (bool, error) + func NewLoader(cacheDir string) *Loader + func (l *Loader) Clear(ref string) error + func (l *Loader) Lister() ([]string, error) + func (l *Loader) Load(spec string) (*Template, error) + func (l *Loader) LoadContext(ctx context.Context, spec string) (*Template, error) + type PostStep struct + Run string + type PreStep struct + Run string + type SpinToml struct + Author Author + Description string + Exclude []string + Include []IncludeRule + Language string + License string + MinSpinVersion string + Name string + Params map[string]params.Spec + Post []PostStep + Pre []PreStep + Repository string + Tags []string + Type string + func ParseSpinToml(path string) (*SpinToml, error) + func ParseSpinTomlBytes(b []byte) (*SpinToml, error) + type Template struct + BaseDir string + Name string + PostHookDir string + PreHookDir string + Repo string + Source string + Spec string + SpinToml *SpinToml + func Detect(dir string) (*Template, error) + func (t *Template) BuildForm(values map[string]any) (*huh.Form, error) + func (t *Template) Hints() []string + func (t *Template) Render(values map[string]any) (map[string][]byte, error) + func (t *Template) RenderTo(ctx context.Context, dest string, values map[string]any) error + func (t *Template) RenderToWithPost(ctx context.Context, dest string, values map[string]any, opts HookOptions) error + func (t *Template) ResolveForm(values map[string]any, interactive bool) (map[string]any, error)