From 272be57cabe61b0683847c4a796d3b021950043b Mon Sep 17 00:00:00 2001 From: alessio Date: Tue, 8 Aug 2017 01:33:31 +0200 Subject: [PATCH] errors stream fixed, fmt --- server/main.go | 2 +- watcher/cmd.go | 1 - watcher/exec.go | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/main.go b/server/main.go index 105c7c4..0e3c726 100644 --- a/server/main.go +++ b/server/main.go @@ -52,7 +52,7 @@ func render(c echo.Context, path string, mime int) error { // Start the web server func (s *Server) Start(p *cli.Context) (err error) { - if p.Bool("server"){ + if p.Bool("server") { s.Server.Status = p.Bool("server") } if p.Bool("open") { diff --git a/watcher/cmd.go b/watcher/cmd.go index 59cb889..673f040 100644 --- a/watcher/cmd.go +++ b/watcher/cmd.go @@ -79,7 +79,6 @@ func (h *Blueprint) Add(p *cli.Context) error { Name: h.Name(p.String("name"), p.String("path")), Path: h.Path(p.String("path")), Cmds: Cmds{ - Vet: p.Bool("vet"), Fmt: !p.Bool("no-fmt"), Test: p.Bool("test"), diff --git a/watcher/exec.go b/watcher/exec.go index 70d658f..5746710 100644 --- a/watcher/exec.go +++ b/watcher/exec.go @@ -85,11 +85,11 @@ func (p *Project) goRun(channel chan bool, runner chan bool, wr *sync.WaitGroup) for output.Scan() { text := output.Text() msg := fmt.Sprintln(p.pname(p.Name, 3), ":", style.Blue.Regular(text)) - if isError || isErrorText(text) { + if isError && isErrorText(text) { out := BufferOut{Time: time.Now(), Text: text, Type: "Go Run"} p.print("error", out, msg, "") } else { - out := BufferOut{Time: time.Now(), Text: text} + out := BufferOut{Time: time.Now(), Text: text, Type: "Go Run"} p.print("out", out, msg, "") } }