Skip to content

Commit

Permalink
all: go-lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomás Senart committed Nov 3, 2019
1 parent 423f835 commit 44a49c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/plot/plot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestPlot(t *testing.T) {
}

if !bytes.Equal(b.Bytes(), g) {
t.Log(string(b.Bytes()))
t.Log(b.String())
t.Errorf("bytes do not match %q", gp)
}
}
Expand Down
4 changes: 3 additions & 1 deletion lib/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ func NewCSVDecoder(r io.Reader) Decoder {
}

r.Error = rec[5]
r.Body, err = base64.StdEncoding.DecodeString(rec[6])
if r.Body, err = base64.StdEncoding.DecodeString(rec[6]); err != nil {
return err
}

r.Attack = rec[7]
if r.Seq, err = strconv.ParseUint(rec[8], 10, 64); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion lib/targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func NewHTTPTargeter(src io.Reader, body []byte, hdr http.Header) Targeter {
}
}

var httpMethodChecker = regexp.MustCompile("^[A-Z]+\\s")
var httpMethodChecker = regexp.MustCompile(`^[A-Z]+\s`)

// A line starts with an http method when the first word is uppercase ascii
// followed by a space.
Expand Down

0 comments on commit 44a49c8

Please sign in to comment.