project

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

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