diff options
| author | Shulhan <m.shulhan@gmail.com> | 2020-06-06 05:25:23 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2020-06-06 05:25:42 +0700 |
| commit | b1133f25df3ec38b503e1ea6129ea6b3397968bb (patch) | |
| tree | 53a2c6755c6a2e0d9ed13b84603e5b8bcd2e3ee0 /lib/http | |
| parent | 8661178b08ce640d7c24aec8465802e4d5160e2a (diff) | |
| download | pakakeh.go-b1133f25df3ec38b503e1ea6129ea6b3397968bb.tar.xz | |
all: use default linter options
Diffstat (limited to 'lib/http')
| -rw-r--r-- | lib/http/client.go | 2 | ||||
| -rw-r--r-- | lib/http/http_test.go | 1 | ||||
| -rw-r--r-- | lib/http/response_test.go | 2 | ||||
| -rw-r--r-- | lib/http/server_test.go | 3 |
4 files changed, 3 insertions, 5 deletions
diff --git a/lib/http/client.go b/lib/http/client.go index 661e57a8..7f085ca2 100644 --- a/lib/http/client.go +++ b/lib/http/client.go @@ -75,7 +75,7 @@ func NewClient(serverURL string, headers http.Header, insecure bool) (client *Cl MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSClientConfig: &tls.Config{ - InsecureSkipVerify: insecure, //nolint: gosec + InsecureSkipVerify: insecure, }, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, diff --git a/lib/http/http_test.go b/lib/http/http_test.go index 4ffca6f9..3eb809d9 100644 --- a/lib/http/http_test.go +++ b/lib/http/http_test.go @@ -14,7 +14,6 @@ import ( libmemfs "github.com/shuLhan/share/lib/memfs" ) -//nolint:gochecknoglobals var ( testServer *Server client = &http.Client{} diff --git a/lib/http/response_test.go b/lib/http/response_test.go index e91a12a3..ffd57388 100644 --- a/lib/http/response_test.go +++ b/lib/http/response_test.go @@ -105,7 +105,7 @@ func TestParseResponseHeader(t *testing.T) { for _, c := range cases { t.Log(c.desc) - got, rest, err := ParseResponseHeader(c.raw) //nolint:bodyclose + got, rest, err := ParseResponseHeader(c.raw) if err != nil { test.Assert(t, "error", c.expErr, err.Error(), true) continue diff --git a/lib/http/server_test.go b/lib/http/server_test.go index 7446274f..a691938f 100644 --- a/lib/http/server_test.go +++ b/lib/http/server_test.go @@ -171,7 +171,6 @@ func TestRegisterDelete(t *testing.T) { } } -//nolint:gochecknoglobals var testEvaluator = func(req *http.Request, reqBody []byte) error { k := req.Form.Get("k") @@ -631,7 +630,7 @@ func TestServeHTTPOptions(t *testing.T) { t.Fatal(err) } - res, err := client.Do(req) //nolint:bodyclose + res, err := client.Do(req) if err != nil { t.Fatal(err) } |
