code review

This commit is contained in:
alessio 2017-07-27 20:48:16 +02:00
parent bccfaca01d
commit b7c50a2efb
4 changed files with 16 additions and 16 deletions

View File

@ -130,17 +130,17 @@ func main() {
} }
} }
if p.Bool("legacy") { if p.Bool("legacy") {
r.Config.Legacy = settings.Legacy{ c.Config.Legacy = settings.Legacy{
Status: p.Bool("legacy"), Status: p.Bool("legacy"),
Interval: interval, Interval: interval,
} }
} }
if p.Bool("no-config") || len(r.Blueprint.Projects) <= 0 { if p.Bool("no-config") || len(c.Blueprint.Projects) <= 0 {
if p.Bool("no-config") { if p.Bool("no-config") {
r.Config.Create = false c.Config.Create = false
} }
r.Blueprint.Projects = []watcher.Project{} c.Blueprint.Projects = []watcher.Project{}
if err := r.Blueprint.Add(p); err != nil { if err := c.Blueprint.Add(p); err != nil {
return err return err
} }
} }

View File

@ -1,9 +1,9 @@
package settings package settings
import ( import (
yaml "gopkg.in/yaml.v2"
"os" "os"
"time" "time"
yaml "gopkg.in/yaml.v2"
) )
var Dir = ".realize/" var Dir = ".realize/"

View File

@ -178,5 +178,5 @@ func (h *Blueprint) check() error {
h.Clean() h.Clean()
return nil return nil
} }
return errors.New("there are no projects") return errors.New("There are no projects")
} }