Skip to content

Commit

Permalink
fix: update metric_streams for golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mccabecillian committed Jun 1, 2022
1 parent 8bcebc4 commit f1fba54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion plugins/inputs/metric_streams/metric_streams.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ func (ms *MetricStreams) serveWrite(res http.ResponseWriter, req *http.Request)
defer ms.writesServed.Incr(1)

// Check that the content length is not too large for us to handle.
//nolint:unconvert // Conversion needed
if req.ContentLength > int64(ms.MaxBodySize) {
ms.Log.Errorf("content length exceeded maximum body size")
if err := tooLarge(res); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/metric_streams/metric_streams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func TestWriteHTTPGzippedData(t *testing.T) {
data, err := os.ReadFile("./testdata/records.gz")
require.NoError(t, err)

req, err := http.NewRequest("POST", createURL(metricStream, "http", "/write", ""), bytes.NewBuffer([]byte(data)))
req, err := http.NewRequest("POST", createURL(metricStream, "http", "/write", ""), bytes.NewBuffer(data))
require.NoError(t, err)
req.Header.Set("Content-Encoding", "gzip")

Expand Down

0 comments on commit f1fba54

Please sign in to comment.