From 7c1066d503bb5b1c7a6b4b41e320f5c32c9d9649 Mon Sep 17 00:00:00 2001 From: asoseil Date: Tue, 31 Oct 2017 13:28:21 +0100 Subject: [PATCH] fmt --- exec.go | 3 +-- realize.go | 4 ++-- utils.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/exec.go b/exec.go index fb67cf7..82984ce 100644 --- a/exec.go +++ b/exec.go @@ -4,6 +4,7 @@ import ( "bufio" "bytes" "fmt" + "github.com/pkg/errors" "log" "os" "os/exec" @@ -12,7 +13,6 @@ import ( "strings" "sync" "time" - "github.com/pkg/errors" ) // GoCompile is used for compile a project @@ -71,7 +71,6 @@ func (p *Project) goRun(stop <-chan bool, runner chan bool) { args = append(args, a...) } - gobin := os.Getenv("GOBIN") path := filepath.Join(gobin, p.name) if _, err := os.Stat(path); err == nil { diff --git a/realize.go b/realize.go index 268512d..f19ca09 100644 --- a/realize.go +++ b/realize.go @@ -70,7 +70,7 @@ func main() { if err := r.insert(p); err != nil { return err } - if !p.Bool("no-config") && p.String("name") == ""{ + if !p.Bool("no-config") && p.String("name") == "" { if err := r.Settings.record(r); err != nil { return err } @@ -118,7 +118,7 @@ func main() { interact.Run(&interact.Interact{ Before: func(context interact.Context) error { context.SetErr(red.bold("INVALID INPUT")) - context.SetPrfx(color.Output, yellow.regular("[") + time.Now().Format("15:04:05") + yellow.regular("]") + yellow.bold("[")+"REALIZE"+yellow.bold("]")) + context.SetPrfx(color.Output, yellow.regular("[")+time.Now().Format("15:04:05")+yellow.regular("]")+yellow.bold("[")+"REALIZE"+yellow.bold("]")) return nil }, Questions: []*interact.Question{ diff --git a/utils.go b/utils.go index 99e3c54..94fa86e 100644 --- a/utils.go +++ b/utils.go @@ -3,9 +3,9 @@ package main import ( "errors" "gopkg.in/urfave/cli.v2" + "log" "os" "strings" - "log" ) // Array check if a string is in given array