Documentation
¶
Index ¶
Constants ¶
const Default = "default"
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read searches for template `name` in all template directories and returns the contents of the first one found. Template names cannot contain the substring ".." to make sure they don't reference files outside the template directories. We are not using securejoin.SecureJoin because the actual template may be a symlink to a directory elsewhere (e.g. when installed by Homebrew).
Types ¶
type Template ¶
func Templates ¶
Templates returns a list of Template structures containing the Name and Location for each template. It searches all template directories, but only the first template of a given name is recorded. Only non-hidden files with a ".yaml" file extension are considered templates. The final result is sorted alphabetically by template name.