Skip to content

Commit

Permalink
fix: golangci-lint issues in files (#17)
Browse files Browse the repository at this point in the history
Signed-off-by: Kush Trivedi <[email protected]>
  • Loading branch information
kushthedude authored Oct 22, 2020
1 parent d4b6693 commit 1e44618
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
6 changes: 5 additions & 1 deletion apinighthawk/nighthawk.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ func NighthawkRun(config *NighthawkConfig) ([]byte, error) {
qps := strconv.FormatFloat(config.QPS, 'f', -1, 64)
c := strconv.Itoa(config.Thread)

args := []string{"--rps " + qps, "--concurrency " + c, "--duration " + duration, rURL.String(), "--output-format experimental_fortio_pedantic"}
args := []string{"--rps " + qps,
"--concurrency " + c,
"--duration " + duration,
rURL.String(),
"--output-format experimental_fortio_pedantic"}

log.Info("Received arguments for run", args)

Expand Down
16 changes: 1 addition & 15 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ func init() {

// Output to stdout instead of the default stderr
log.SetOutput(os.Stdout)

// // Output to only for logs above warn level
// log.SetLevel(log.WarnLevel)
}
func main() {
// Duration in seconds nighthawk default format
Expand All @@ -38,21 +35,12 @@ func main() {
log.Fatal(err)
}

// fmt.Print(string(result))
// // res1 := string(result)

var result1 periodic.RunnerResults
// var bd []byte

// hres, _ := res1.(*fhttp.HTTPRunnerResults)
// bd, err = json.Marshal(hres)
// result1 = hres.Result()

err = json.Unmarshal([]byte(result), &result1)
err = json.Unmarshal(result, &result1)

if err != nil {
err = errors.Wrap(err, "Error while unmarshaling Nighthawk results to the FortioHTTPRunner")
// logrus.Error(err)
log.Fatal(err)
}

Expand All @@ -61,10 +49,8 @@ func main() {

if err != nil {
err = errors.Wrap(err, "Error while unmarshaling Nighthawk results to map")
// log.Error(err)
log.Fatal(err)
}

log.Infof("Mapped version of the test: %+#v", resultsMap)

}

0 comments on commit 1e44618

Please sign in to comment.