templates

package
v0.1.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

func Register

func Register(g Generator)

Register adds a template generator to the registry.

Types

type Generator

type Generator interface {
	Name() string
	Generate(projectPath, modName string) error
	PrintNextSteps()
}

func Get

func Get(name string) (Generator, bool)

type MultiFileGenerator

type MultiFileGenerator struct {
	// contains filtered or unexported fields
}

func NewMultiFileGenerator

func NewMultiFileGenerator(name string, files embed.FS, printNextSteps string) MultiFileGenerator

func (MultiFileGenerator) Generate

func (m MultiFileGenerator) Generate(projectPath, modName string) error

func (MultiFileGenerator) Name

func (m MultiFileGenerator) Name() string

func (MultiFileGenerator) PrintNextSteps

func (m MultiFileGenerator) PrintNextSteps()

type SingleFileGenerator

type SingleFileGenerator struct {
	// contains filtered or unexported fields
}

func NewSingleFileGenerator

func NewSingleFileGenerator(name, content, printNextSteps string) SingleFileGenerator

func (SingleFileGenerator) Generate

func (s SingleFileGenerator) Generate(projectPath, modName string) error

func (SingleFileGenerator) Name

func (s SingleFileGenerator) Name() string

func (SingleFileGenerator) PrintNextSteps

func (s SingleFileGenerator) PrintNextSteps()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL