Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListEmbedded ¶
ListEmbedded returns names of all built-in templates in the provided embedded FS.
func ListUserBlueprints ¶
ListUserBlueprints returns names of all blueprints in ~/.new/blueprints/.
func SetEmbedded ¶
SetEmbedded wires in the embedded templates/projects sub-filesystem so that List and Resolve can reference built-in templates.
Types ¶
type Blueprint ¶
type Blueprint struct {
Name string
Manifest *Manifest
// FS is the filesystem rooted at the blueprint directory.
FS fs.FS
}
Blueprint represents a resolved blueprint — either a user blueprint from ~/.new/blueprints/<name> or an embedded built-in template.
type Manifest ¶
type Manifest struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
// Vars lists variable names the blueprint expects (used for prompting later).
Vars []string `yaml:"vars"`
// Defaults provides fallback values for vars.
Defaults map[string]string `yaml:"defaults"`
}
Manifest is the optional blueprint.yaml descriptor inside a blueprint folder.
Click to show internal directories.
Click to hide internal directories.