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") {
r.Config.Legacy = settings.Legacy{
c.Config.Legacy = settings.Legacy{
Status: p.Bool("legacy"),
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") {
r.Config.Create = false
c.Config.Create = false
}
r.Blueprint.Projects = []watcher.Project{}
if err := r.Blueprint.Add(p); err != nil {
c.Blueprint.Projects = []watcher.Project{}
if err := c.Blueprint.Add(p); err != nil {
return err
}
}

View File

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

View File

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