Documentation ¶
Index ¶
- Constants
- func TargetExists(targetpath string) bool
- func UserHomeDir() string
- func UserName() string
- type TemplateConfig
- func (tc TemplateConfig) GetItem(name string) *TemplateItem
- func (tc TemplateConfig) GetKeyAsInt(keyname string) int
- func (tc TemplateConfig) GetKeyAsString(keyname string) string
- func (tc *TemplateConfig) Load()
- func (tc TemplateConfig) LoadFile() *ini.File
- func (tc TemplateConfig) SaveTo(filename string) error
- type TemplateItem
Constants ¶
View Source
const ConfigFilename string = ".template.cfg"
Variables ¶
This section is empty.
Functions ¶
func TargetExists ¶
TargetExists return true if target exists
func UserHomeDir ¶
func UserHomeDir() string
Types ¶
type TemplateConfig ¶
type TemplateConfig struct { Filepath string MailAddress string Company string Copyright string License string User string UserName string Lang string Homedir string // ScriptName string FullPath string Verbose bool Stdout bool Title string Description string // time strings Date string Year string Object *ini.File Items []*TemplateItem }
func NewTemplateConfig ¶
func NewTemplateConfig(lang string) *TemplateConfig
func (TemplateConfig) GetItem ¶
func (tc TemplateConfig) GetItem(name string) *TemplateItem
func (TemplateConfig) GetKeyAsInt ¶
func (tc TemplateConfig) GetKeyAsInt(keyname string) int
func (TemplateConfig) GetKeyAsString ¶
func (tc TemplateConfig) GetKeyAsString(keyname string) string
func (*TemplateConfig) Load ¶
func (tc *TemplateConfig) Load()
func (TemplateConfig) LoadFile ¶
func (tc TemplateConfig) LoadFile() *ini.File
func (TemplateConfig) SaveTo ¶
func (tc TemplateConfig) SaveTo(filename string) error
Click to show internal directories.
Click to hide internal directories.