Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a directory that contains multiple templates.
func OpenStore ¶
OpenStore returns a new Store for the passed dir. It will also create the dir if it doesn't exist.
func (*Store) Create ¶
Create copies a template into the Store and stores it under the passed key. If there are any errors this might leave a partially created template in the store.
func (*Store) Get ¶
Get returns the template that is store under the passed key. If the template cannot be loaded it will return an error
type Template ¶
type Template struct { // The Templates metadata Meta meta `yaml:"meta"` // Our internal representation of the Questions to ask Questions []question `yaml:"questions"` // contains filtered or unexported fields }
Template is our representation of a set of templates and questions.
func (*Template) Execute ¶
Execute applies the template to a given directory using the data that has been passed in.
func (*Template) GetQuestions ¶
GetQuestions takes the templates internal representation of the Template's questions and converts them into a format that can be used by survey.