reload time field

This commit is contained in:
alessio 2016-08-01 16:16:43 +02:00
parent d2a73eec94
commit dadadee7b7
1 changed files with 5 additions and 1 deletions

View File

@ -22,12 +22,14 @@ var green = color.New(color.FgGreen, color.Bold).SprintFunc()
var greenl = color.New(color.FgHiGreen).SprintFunc() var greenl = color.New(color.FgHiGreen).SprintFunc()
type Config struct { type Config struct {
file string `yaml:"app_file,omitempty"` file string
Version string `yaml:"version,omitempty"` Version string `yaml:"version,omitempty"`
Projects []Project Projects []Project
} }
type Project struct { type Project struct {
base string
reload time.Time
Name string `yaml:"app_name,omitempty"` Name string `yaml:"app_name,omitempty"`
Run bool `yaml:"app_run,omitempty"` Run bool `yaml:"app_run,omitempty"`
Bin bool `yaml:"app_bin,omitempty"` Bin bool `yaml:"app_bin,omitempty"`
@ -138,6 +140,7 @@ func (h *Config) Add(params *cli.Context) error{
Watcher: Watcher{ Watcher: Watcher{
Paths: []string{path}, Paths: []string{path},
Exts: []string{ext}, Exts: []string{ext},
Ignore: []string{ignore},
}, },
} }
if Duplicates(new, h.Projects) { if Duplicates(new, h.Projects) {
@ -179,6 +182,7 @@ func (h *Config) List() error{
fmt.Println(greenl("|"),"\t\t", green("Before:"), red(val.Watcher.Before)) fmt.Println(greenl("|"),"\t\t", green("Before:"), red(val.Watcher.Before))
fmt.Println(greenl("|"),"\t\t", green("Extensions:"), red(val.Watcher.Exts)) fmt.Println(greenl("|"),"\t\t", green("Extensions:"), red(val.Watcher.Exts))
fmt.Println(greenl("|"),"\t\t", green("Paths:"), red(val.Watcher.Paths)) fmt.Println(greenl("|"),"\t\t", green("Paths:"), red(val.Watcher.Paths))
fmt.Println(greenl("|"),"\t\t", green("Paths ignored:"), red(val.Watcher.Ignore))
} }
return nil return nil
}else{ }else{