aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <oleksandr.red+github@gmail.com> 2023-02-11 09:35:15 +0200
committerGravatar GitHub <noreply@github.com> 2023-02-11 15:35:15 +0800
commit934f04e33096b7884d96135d44f2879a82e54a94 (patch)
tree98cd897d8d434aee3c5a95046f9f02ebfcb3721d /server.go
parentRename unexported funcs, vars to match common Go (#1488) (diff)
downloadfasthttp-934f04e33096b7884d96135d44f2879a82e54a94.tar.gz
fasthttp-934f04e33096b7884d96135d44f2879a82e54a94.tar.bz2
fasthttp-934f04e33096b7884d96135d44f2879a82e54a94.zip
Refactor golangci-lint config and remove redundant nolints (#1486)
* Refactor golangci-lint config - Use golangci-lint-action for GitHub workflow. - Add additional golangci-lint run options. - Remove unused nolint directives. * Revert exclude-use-default option
Diffstat (limited to 'server.go')
-rw-r--r--server.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/server.go b/server.go
index 63e39f6..22873b5 100644
--- a/server.go
+++ b/server.go
@@ -148,7 +148,7 @@ type ServeHandler func(c net.Conn) error
//
// It is safe to call Server methods from concurrently running goroutines.
type Server struct {
- noCopy noCopy //nolint:unused,structcheck
+ noCopy noCopy
// Handler for processing incoming requests.
//
@@ -577,7 +577,7 @@ func CompressHandlerBrotliLevel(h RequestHandler, brotliLevel, otherLevel int) R
// running goroutines. The only exception is TimeoutError*, which may be called
// while other goroutines accessing RequestCtx.
type RequestCtx struct {
- noCopy noCopy //nolint:unused,structcheck
+ noCopy noCopy
// Incoming request.
//
@@ -1950,12 +1950,12 @@ func acceptConn(s *Server, ln net.Listener, lastPerIPErrorTime *time.Time) (net.
if tc, ok := c.(*net.TCPConn); ok && s.TCPKeepalive {
if err := tc.SetKeepAlive(s.TCPKeepalive); err != nil {
- tc.Close() //nolint:errcheck
+ _ = tc.Close()
return nil, err
}
if s.TCPKeepalivePeriod > 0 {
if err := tc.SetKeepAlivePeriod(s.TCPKeepalivePeriod); err != nil {
- tc.Close() //nolint:errcheck
+ _ = tc.Close()
return nil, err
}
}