errors stream fixed, fmt

This commit is contained in:
alessio 2017-08-08 01:33:31 +02:00
parent 369001338c
commit 272be57cab
3 changed files with 3 additions and 4 deletions

View File

@ -52,7 +52,7 @@ func render(c echo.Context, path string, mime int) error {
// Start the web server // Start the web server
func (s *Server) Start(p *cli.Context) (err error) { func (s *Server) Start(p *cli.Context) (err error) {
if p.Bool("server"){ if p.Bool("server") {
s.Server.Status = p.Bool("server") s.Server.Status = p.Bool("server")
} }
if p.Bool("open") { if p.Bool("open") {

View File

@ -79,7 +79,6 @@ func (h *Blueprint) Add(p *cli.Context) error {
Name: h.Name(p.String("name"), p.String("path")), Name: h.Name(p.String("name"), p.String("path")),
Path: h.Path(p.String("path")), Path: h.Path(p.String("path")),
Cmds: Cmds{ Cmds: Cmds{
Vet: p.Bool("vet"), Vet: p.Bool("vet"),
Fmt: !p.Bool("no-fmt"), Fmt: !p.Bool("no-fmt"),
Test: p.Bool("test"), Test: p.Bool("test"),

View File

@ -85,11 +85,11 @@ func (p *Project) goRun(channel chan bool, runner chan bool, wr *sync.WaitGroup)
for output.Scan() { for output.Scan() {
text := output.Text() text := output.Text()
msg := fmt.Sprintln(p.pname(p.Name, 3), ":", style.Blue.Regular(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"} out := BufferOut{Time: time.Now(), Text: text, Type: "Go Run"}
p.print("error", out, msg, "") p.print("error", out, msg, "")
} else { } else {
out := BufferOut{Time: time.Now(), Text: text} out := BufferOut{Time: time.Now(), Text: text, Type: "Go Run"}
p.print("out", out, msg, "") p.print("out", out, msg, "")
} }
} }