templates

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(templatesDir string) (map[string]*Template, error)

List embedded and external templates

func ListDir

func ListDir(dir string) (map[string]*Template, error)

func ListEmbedded

func ListEmbedded() map[string]*Template

Types

type Template

type Template struct {
	Description string            `json:"description" yaml:"description"`
	Manifest    types.Manifest    `json:"manifest" yaml:"manifest"`               // manifest to copy
	PostClone   string            `json:"post_clone,omitempty" yaml:"post_clone"` // action (make target) name that should be invoked after clone
	Check       [][]string        `json:"check,omitempty" yaml:"check,omitempty"` // check availability (one line - one check)
	Files       map[string]string `json:"files,omitempty"`
}

func Read

func Read(filename string) (*Template, error)

func (*Template) IsAvailable

func (t *Template) IsAvailable(ctx context.Context) bool

Jump to

Keyboard shortcuts

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