From bf8c321ee2c136f7a01b04ff0937aa142aa1325c Mon Sep 17 00:00:00 2001 From: Andrea Manzini Date: Sat, 3 Oct 2020 09:33:45 +0200 Subject: [PATCH] linter suggestion; I think it's also more readable --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 1783877..7c8c37f 100644 --- a/main.go +++ b/main.go @@ -143,11 +143,11 @@ func (c *cli) makeOptions() (*attacker.Options, error) { body := []byte(c.body) if c.bodyFile != "" { - if b, err := ioutil.ReadFile(c.bodyFile); err != nil { + b, err := ioutil.ReadFile(c.bodyFile) + if err != nil { return nil, fmt.Errorf("unable to open %q: %w", c.bodyFile, err) - } else { - body = b } + body = b } return &attacker.Options{