Documentation ¶
Index ¶
- type Answers
- type Config
- type ConfigVersion
- type Project
- type Question
- type Questions
- type Template
- func (t *Template) Clone(p Project) error
- func (t *Template) Initialize(force bool) error
- func (t *Template) LoadConfig() (*Config, error)
- func (t *Template) LoadQuestions() (Questions, error)
- func (t *Template) Origin(dst string) (url, refname string, err error)
- func (t *Template) SaveConfig(c *Config, force bool) error
- func (t *Template) SaveQuestions(q *Questions, force bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Version ConfigVersion `toml:"version"`
}
Config defines Tribble-specific project template settings.
type ConfigVersion ¶
type ConfigVersion int
ConfigVersion indicates project template settings compatibility. Currently only one version is defined: 0
const (
V0 ConfigVersion = iota // unstable / experimental
)
type Question ¶
type Question struct { Prompt string `toml:"prompt"` Type string `toml:"type,omitempty"` Default interface{} `toml:"default"` Required bool `toml:"required"` }
Question is a project-specific setting.
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func (*Template) Initialize ¶
Initialize creates the files required for a project template.
func (*Template) LoadConfig ¶
LoadConfig reads Tribble-specific project template settings.
func (*Template) LoadQuestions ¶
LoadQuestions reads Tribble-specific project template settings.
func (*Template) SaveConfig ¶
SaveConfig writes Tribble-specific project template settings.
Click to show internal directories.
Click to hide internal directories.