Help us shape the future of Go! Take the 2026 Go Developer Survey

templates

package
v0.24.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

FS contains the embedded default templates for installation and generation.

View Source
var ReadFunc = func(path string) ([]byte, error) {
	return fs.ReadFile(FS, path)
}

ReadFunc is the function used by Read. Tests can replace it to simulate errors.

View Source
var WalkFunc = func(root string, fn fs.WalkDirFunc) error {
	return fs.WalkDir(FS, root, fn)
}

WalkFunc is the function used by Walk. Tests can replace it to simulate errors.

Functions

func IsSafeCLISkillCatalogID added in v0.24.0

func IsSafeCLISkillCatalogID(id string) bool

IsSafeCLISkillCatalogID returns true for single-segment catalog ids that can be used as .agent-layer/skills/<id>/ directory names.

func Read

func Read(path string) ([]byte, error)

Read returns the contents of an embedded template file.

func Walk

func Walk(root string, fn fs.WalkDirFunc) error

Walk walks the embedded template filesystem under the given root.

Types

type CLISkillCatalogEntry added in v0.24.0

type CLISkillCatalogEntry struct {
	ID              string
	Name            string
	Binary          string   `toml:"binary"`
	OwnershipMarker string   `toml:"ownership_marker"`
	Members         []string `toml:"members"`
}

CLISkillCatalogEntry describes one CLI skill catalog option. A non-empty Members list is a grouped entry: the catalog id is the checkbox identity only, and each member is a destination directory copied from embedded skills/<member>/ rather than skills-catalog/<id>/. Binary names the external CLI the skill requires, if any.

func LoadCLISkillCatalog added in v0.24.0

func LoadCLISkillCatalog() ([]CLISkillCatalogEntry, error)

LoadCLISkillCatalog parses the embedded cli-skills-catalog.toml file into typed catalog entries. Errors loudly when the catalog is missing, malformed, contains no entries, or contains an entry with an invalid or duplicate id, name, or member.

Jump to

Keyboard shortcuts

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