From 55ce5f2be4e9731b3a05cad8eb54b69b5a03a837 Mon Sep 17 00:00:00 2001 From: alessio Date: Mon, 22 Aug 2016 13:45:42 +0200 Subject: [PATCH] config flag fixed --- main.go | 4 ++-- realize/watcher.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index d9aa312..cd2eb94 100644 --- a/main.go +++ b/main.go @@ -70,7 +70,7 @@ func main() { &cli.BoolFlag{Name: "run", Usage: "Disable go run"}, &cli.BoolFlag{Name: "bin", Usage: "Disable go install"}, &cli.BoolFlag{Name: "fmt", Usage: "Disable gofmt"}, - &cli.BoolFlag{Name: "config", Usage: "If there is a config file with a project for the current directory take that configuration"}, + &cli.BoolFlag{Name: "config", Value: false, Usage: "If there is a config file with a project for the current directory take that configuration"}, }, Action: func(p *cli.Context) error { y := r.New(p) @@ -88,7 +88,7 @@ func main() { Aliases: []string{"a"}, Usage: "Add another project", Flags: []cli.Flag{ - &cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: wd(),Usage: "Project name \t"}, + &cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: wd(), Usage: "Project name \t"}, &cli.StringFlag{Name: "path", Aliases: []string{"b"}, Value: "/", Usage: "Project base path \t"}, &cli.BoolFlag{Name: "build", Value: false, Usage: "Enable go build"}, &cli.BoolFlag{Name: "run", Usage: "Disable go run"}, diff --git a/realize/watcher.go b/realize/watcher.go index 6c99187..c7370fa 100644 --- a/realize/watcher.go +++ b/realize/watcher.go @@ -45,7 +45,6 @@ func (h *Config) Fast(params *cli.Context) error { fast := h.Projects[0] // Takes the values from config if wd path match someone else if params.Bool("config") { - fmt.Println(params.Bool("config")) if err := h.Read(); err == nil { for _, val := range h.Projects { if fast.Path == val.Path {