Skip to content

Commit

Permalink
fix: fix syntax error (#19)
Browse files Browse the repository at this point in the history
Closes #18
  • Loading branch information
aeneasr committed Jun 8, 2020
1 parent 5c6e715 commit 4460d6a
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ GO_TEST_BINARY="gotest"

stderr, err := c.StderrPipe()
if err != nil {
fatalf("%s", err)
return err
}
stdout, err := c.StdoutPipe()
if err != nil {
fatalf("%s", err)
return err
}

if err := c.Start(); err != nil {
fatalf("%s", err)
return err
}

var wg sync.WaitGroup
Expand All @@ -151,7 +151,7 @@ GO_TEST_BINARY="gotest"
go scan(&wg, stdout)

if err := c.Wait(); err != nil {
fatalf("%s", err)
return err
}

wg.Wait()
Expand All @@ -164,7 +164,7 @@ GO_TEST_BINARY="gotest"

p, err := ioutil.ReadFile(file)
if err != nil {
fatalf("%s", err)
return err
}

ps := strings.Split(string(p), "\n")
Expand All @@ -173,12 +173,10 @@ GO_TEST_BINARY="gotest"

output, err := cmd.Flags().GetString("output")
if err != nil {
fatalf("%s", err)
return err
}

if err := ioutil.WriteFile(output, []byte(payload), 0644); err != nil {
fatalf("%s", err)
}
return ioutil.WriteFile(output, []byte(payload), 0644)
},
}

Expand Down Expand Up @@ -218,12 +216,6 @@ func initConfig() {

}

func fatalf(msg string, args ...interface{}) {
fmt.Printf(msg, args...)
fmt.Println("")
os.Exit(1)
}

type filter struct {
dtl io.Writer
}
Expand Down

0 comments on commit 4460d6a

Please sign in to comment.