Documentation ¶
Index ¶
Constants ¶
View Source
const ( TOML string = "toml" YAML string = "yaml" JSON string = "json" )
template constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectTemplate ¶
type ProjectTemplate struct { Content []os.FileInfo Viper *viper.Viper Config TemplateConfig WorkingDirectory string // contains filtered or unexported fields }
The full template struct
func (*ProjectTemplate) LoadScripts ¶
func (self *ProjectTemplate) LoadScripts() error
Read the config file and load the data into template config
func (*ProjectTemplate) RunOnCreateScripts ¶
func (self *ProjectTemplate) RunOnCreateScripts() error
Execute on create scripts
func (*ProjectTemplate) RunOnMountScripts ¶
func (self *ProjectTemplate) RunOnMountScripts() error
Execute on mount scripts
type TemplateConfig ¶
Set config for your configuration
type TemplateScripts ¶
type TemplateScripts struct { UniversalScripts map[string][]exec.Cmd // `scripts_scope:"universal"` LinuxScripts map[string][]exec.Cmd // `scripts_scope:"linux"` MacosScripts map[string][]exec.Cmd // `scripts_scope:"macos"` WindowsScripts map[string][]exec.Cmd // `scripts_scope:"windows"` }
A set of scripts to execute
func (*TemplateScripts) Unmarshal ¶
func (self *TemplateScripts) Unmarshal(scriptsScopeMap map[string]scriptsMap) error
Click to show internal directories.
Click to hide internal directories.