Versions in this module Expand all Collapse all v0 v0.2.0 Nov 1, 2026 Changes in this version + func ContextWithOptions(ctx context.Context, opts Options) context.Context + func SetLogger(logger Logger) + type Options struct + Force bool + Funcs template.FuncMap + StripMarkers bool + func OptionsFromContext(ctx context.Context) Options v0.1.0 Oct 24, 2026 Changes in this version + const PartExtension + const PatchExtension + const TmplExtension + var ErrFailedGeneration = errors.New("some error(s) occurred during generation") + var ErrRequiredField = errors.New("required field") + func ApplyPatches[T any](fsys fs.FS, root *os.Root, tmpl Template[T], data any) error + func ApplySections[T any](fsys fs.FS, root *os.Root, tmpl Template[T], data any) error + func ApplyTemplate[T any](fsys fs.FS, root *os.Root, tmpl Template[T], config T) error + func Configure(opts ...OptionFunc) + func ExecuteTemplate(tmpl *template.Template, data any, root *os.Root, name string, ...) error + func Forced() bool + func FuncMap() template.FuncMap + func Generate[T any](ctx context.Context, destdir string, config T, parsers []Parser[T], ...) error + func GlobsWithPart(src string) []string + func Initialize[T any](ctx context.Context, opts ...InitializeOption[T]) (T, error) + func IsEmpty(content []byte, policy EmptyPolicy) bool + func IsGenerated(out string) (bool, error) + func NewLoggerURL(transport http.RoundTripper) http.RoundTripper + func ToSlug(in string) string + type Delimiters struct + EndDelim string + StartDelim string + func DelimitersBracket() Delimiters + func DelimitersChevron() Delimiters + func DelimitersSquareBracket() Delimiters + type EmptyPolicy int + const PolicyKeepEmpty + const PolicyRemoveEmpty + type FormGroup func(config *T) *huh.Group + type GeneratePolicy int + const PolicyAlways + const PolicyDefault + const PolicyRemove + const PolicySkip + func SkipIfExists(path string, otherwise GeneratePolicy) GeneratePolicy + type GeneratePolicyFunc func(path string, config T) GeneratePolicy + func RemoveIf[T any](remove func(T) bool, otherwise GeneratePolicy) GeneratePolicyFunc[T] + func StaticPolicy[T any](policy GeneratePolicy) GeneratePolicyFunc[T] + type Generator func(ctx context.Context, root *os.Root, config T) error + func GeneratorModules[T any, M Module](fsys fs.FS, modules func(config T) []M, templates []Template[M]) Generator[T] + func GeneratorTemplates[T any](fsys fs.FS, templates []Template[T]) Generator[T] + type InitializeOption func(initializeOptions[T]) initializeOptions[T] + func WithFormGroups[T any](inputs ...FormGroup[T]) InitializeOption[T] + func WithTeaOptions[T any](opts ...tea.ProgramOption) InitializeOption[T] + type Logger interface + Debugf func(format string, args ...any) + Errorf func(format string, args ...any) + Infof func(format string, args ...any) + Warnf func(format string, args ...any) + func GetLogger() Logger + func NewTestLogger(writer io.Writer) Logger + type Module interface + Dir func() string + type OptionFunc func(options) options + func WithForce(force bool) OptionFunc + func WithFuncMap(funcs template.FuncMap) OptionFunc + func WithLogger(logger Logger) OptionFunc + type Parser func(ctx context.Context, destdir string, config *T) error + type Section struct + Begin string + End string + type Template struct + EmptyPolicy EmptyPolicy + GeneratePolicy GeneratePolicyFunc[T] + Globs []string + Mode os.FileMode + Out string + Patches []string + Sections []Section