dev: update linter (#1728)

- gofumpt everything
- fix TLS MinVersion to be at least 1.2
- add octal syntax
- remove newlines
- fix potential decompression bomb in ecjson
- remove implicit memory aliasing in for loops.

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
bobby 2020-12-30 09:02:57 -08:00 committed by GitHub
parent 5b18527fee
commit f837c92741
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 373 additions and 409 deletions

View file

@ -292,6 +292,7 @@ func TestLogHeadersHandler(t *testing.T) {
t.Errorf("Invalid log output, got: %s, want: %s", got, want)
}
}
func TestAccessHandler(t *testing.T) {
out := &bytes.Buffer{}
@ -300,7 +301,6 @@ func TestAccessHandler(t *testing.T) {
h := AccessHandler(func(r *http.Request, status, size int, duration time.Duration) {
l := FromRequest(r)
l.Log().Int("status", status).Int("size", size).Msg("info")
})(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
l := FromRequest(r)
l.Log().Msg("some inner logging")
@ -316,5 +316,4 @@ func TestAccessHandler(t *testing.T) {
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("TestAccessHandler: %s", diff)
}
}