Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Preparer ¶
type Preparer interface {
// RemoveGitHistory removes the .git directory from the project.
RemoveGitHistory(directory string) error
// RemoveMaintainerFiles removes files that are meant for template maintainers
// (e.g., README.md, LICENSE) before template processing.
RemoveMaintainerFiles(directory string) error
// SelectBlueprintFormat removes the unused blueprint file.
// The selected format's .tmpl file will be processed by SubstitutePlaceholders.
SelectBlueprintFormat(directory string, format string) error
// SubstitutePlaceholders finds all .tmpl files, processes them as Go templates,
// writes the output without the .tmpl extension, and removes the original .tmpl files.
SubstitutePlaceholders(directory string, values TemplateValues) error
}
Preparer is an interface that provides methods for preparing a project after it has been cloned from a template repository.
func NewDefaultPreparer ¶
func NewDefaultPreparer() Preparer
NewDefaultPreparer creates a new instance of the default Preparer implementation.
type TemplateValues ¶
type TemplateValues struct {
ProjectName string
NormalisedProjectName string
BlueprintFormat string
}
TemplateValues holds the values to substitute in template files.
func NewTemplateValues ¶
func NewTemplateValues(projectName, blueprintFormat string) TemplateValues
NewTemplateValues creates a TemplateValues struct with computed fields.
Click to show internal directories.
Click to hide internal directories.