This PR adds missing dots at the end of comments. Also, enables godot linter to ensure comments always end with a full stop. Additionally, enables stylecheck issue to ensure comments always start with a function name.
The full log of running golangci-lint:
❯ golangci-lint run
prefork/prefork.go:78:59: Comment should end in a period (godot)
// IsChild checks if the current thread/process is a child
^
prefork/prefork.go:89:65: Comment should end in a period (godot)
// New wraps the fasthttp server to run with preforked processes
^
prefork/prefork.go:233:63: Comment should end in a period (godot)
// ListenAndServe serves HTTP requests from the given TCP addr
^
args.go:121:40: Comment should end in a period (godot)
// For example args.Sort(bytes.Compare)
^
args.go:232:40: Comment should end in a period (godot)
// Only key in argument, like key1&key2
^
client.go:661:75: Comment should end in a period (godot)
// ConnPoolStrategyType define strategy of connection pool enqueue/dequeue
^
client.go:875:53: Comment should end in a period (godot)
// LastUseTime returns time the client was last used
^
client.go:1697:53: Comment should end in a period (godot)
// ConnsCount returns connection count of HostClient
^
client.go:2029:37: Comment should end in a period (godot)
// inspired by net/http/transport.go
^
client.go:2084:37: Comment should end in a period (godot)
// inspired by net/http/transport.go
^
cookie.go:26:53: Comment should end in a period (godot)
// CookieSameSiteDisabled removes the SameSite flag
^
cookie.go:28:53: Comment should end in a period (godot)
// CookieSameSiteDefaultMode sets the SameSite flag
^
cookie.go:30:74: Comment should end in a period (godot)
// CookieSameSiteLaxMode sets the SameSite flag with the "Lax" parameter
^
cookie.go:32:80: Comment should end in a period (godot)
// CookieSameSiteStrictMode sets the SameSite flag with the "Strict" parameter
^
cookie.go:125:92: Comment should end in a period (godot)
// set value CookieSameSiteNoneMode will set Secure to true also to avoid browser rejection
^
cookie.go:177:29: Comment should end in a period (godot)
// Set max age to 0 to unset
^
cookie.go:184:62: Comment should end in a period (godot)
// CookieExpireUnlimited is returned if cookie doesn't expire
^
fs.go:561:54: Comment should end in a period (godot)
// files bigger than this size are sent with sendfile
^
fs.go:1439:62: Comment should end in a period (godot)
// newCompressedFSFileCache use memory cache compressed files
^
header.go:347:68: Comment should end in a period (godot)
// addVaryBytes add value to the 'Vary' header if it's not included
^
header.go:951:73: Comment should end in a period (godot)
// This is enabled by default unless disabled using DisableNormalizing()
^
header.go:983:73: Comment should end in a period (godot)
// This is enabled by default unless disabled using DisableNormalizing()
^
header.go:1353:63: Comment should end in a period (godot)
// setNonSpecial directly put into map i.e. not a basic header
^
header.go:1412:63: Comment should end in a period (godot)
// setNonSpecial directly put into map i.e. not a basic header
^
header.go:3335:65: Comment should end in a period (godot)
// removeNewLines will replace `\r` and `\n` with an empty space
^
headers.go:3:11: Comment should end in a period (godot)
// Headers
^
headers.go:5:19: Comment should end in a period (godot)
// Authentication
^
headers.go:11:12: Comment should end in a period (godot)
// Caching
^
headers.go:19:17: Comment should end in a period (godot)
// Client hints
^
headers.go:29:17: Comment should end in a period (godot)
// Conditionals
^
headers.go:38:26: Comment should end in a period (godot)
// Connection management
^
headers.go:43:24: Comment should end in a period (godot)
// Content negotiation
^
headers.go:49:13: Comment should end in a period (godot)
// Controls
^
headers.go:55:9: Comment should end in a period (godot)
// CORS
^
headers.go:68:17: Comment should end in a period (godot)
// Do Not Track
^
headers.go:72:14: Comment should end in a period (godot)
// Downloads
^
headers.go:75:29: Comment should end in a period (godot)
// Message body information
^
headers.go:82:12: Comment should end in a period (godot)
// Proxies
^
headers.go:89:14: Comment should end in a period (godot)
// Redirects
^
headers.go:92:20: Comment should end in a period (godot)
// Request context
^
headers.go:99:21: Comment should end in a period (godot)
// Response context
^
headers.go:103:19: Comment should end in a period (godot)
// Range requests
^
headers.go:109:13: Comment should end in a period (godot)
// Security
^
headers.go:125:22: Comment should end in a period (godot)
// Server-sent event
^
headers.go:132:20: Comment should end in a period (godot)
// Transfer coding
^
headers.go:137:15: Comment should end in a period (godot)
// WebSockets
^
headers.go:144:10: Comment should end in a period (godot)
// Other
^
http.go:253:63: Comment should end in a period (godot)
// IsBodyStream returns true if body is set via SetBodyStream*
^
http.go:258:63: Comment should end in a period (godot)
// IsBodyStream returns true if body is set via SetBodyStream*
^
http.go:897:27: Comment should end in a period (godot)
// URI returns request URI
^
http.go:1852:74: Comment should end in a period (godot)
// Bodies with sizes smaller than minCompressLen aren't compressed at all
^
http.go:2370:31: Comment should end in a period (godot)
// c.DoTimeout(&req, &resp, t)
^
lbclient.go:62:58: Comment should end in a period (godot)
// DoDeadline calls DoDeadline on the least loaded client
^
lbclient.go:67:81: Comment should end in a period (godot)
// DoTimeout calculates deadline and calls DoDeadline on the least loaded client
^
lbclient.go:99:43: Comment should end in a period (godot)
// returns the new total number of clients
^
lbclient.go:112:43: Comment should end in a period (godot)
// returns the new total number of clients
^
server.go:487:68: Comment should end in a period (godot)
// RequestConfig configure the per request deadline and body limits
^
server.go:729:68: Comment should end in a period (godot)
// ResetUserValues allows to reset user values from Request Context
^
server.go:1734:53: Comment should end in a period (godot)
// in one server structure. See examples/multidomain
^
server.go:2053:59: Comment should end in a period (godot)
// This function is intended be used by monitoring systems
^
server.go:2060:59: Comment should end in a period (godot)
// This function is intended be used by monitoring systems
^
server.go:2726:69: Comment should end in a period (godot)
// RequestCtx.s.done is only closed when the server is shutting down
^
server.go:2739:69: Comment should end in a period (godot)
// RequestCtx.s.done is only closed when the server is shutting down
^
server.go:2754:57: Comment should end in a period (godot)
// This method is the same as calling ctx.UserValue(key)
^
uri.go:557:23: Comment should end in a period (godot)
// or matches /^:\d*$/
^
client_unix_test.go:13:19: Comment should end in a period (godot)
// See issue #1232
^
client_unix_test.go:76:19: Comment should end in a period (godot)
// See issue #1232
^
fs_fs_test.go:368:7: Comment should end in a period (godot)
// *//
^
header_timing_test.go:15:42: Comment should end in a period (godot)
// it has the same length as Content-Type
^
header_timing_test.go:102:21: Comment should end in a period (godot)
// Result: 2.2 ns/op
^
header_timing_test.go:116:21: Comment should end in a period (godot)
// Result: 2.9 ns/op
^
header_timing_test.go:130:21: Comment should end in a period (godot)
// Result: 2.3 ns/op
^
header_timing_test.go:144:21: Comment should end in a period (godot)
// Result: 2.9 ns/op
^
server_test.go:26:51: Comment should end in a period (godot)
// Make sure RequestCtx implements context.Context
^
fs_handler_example_test.go:10:50: Comment should end in a period (godot)
// Setup file handlers (aka 'file server config')
^
fs_handler_example_test.go:30:24: Comment should end in a period (godot)
// Main request handler
^
server.go:1146:2: ST1003: var NetHttpFormValueFunc should be NetHTTPFormValueFunc (stylecheck)
NetHttpFormValueFunc = func(ctx *RequestCtx, key string) []byte {
^
client.go:1955:15: ST1005: error strings should not end with punctuation or newlines (stylecheck)
return nil, errors.New("dialling unsuccessful. Please report this bug!")
^
server.go:22:1: ST1022: comment on exported var ErrAlreadyServing should be of the form "ErrAlreadyServing ..." (stylecheck)
// Deprecated: ErrAlreadyServing is never returned from Serve. See issue #633.
^
client_test.go:2264:26: ST1016: methods on the same type should have the same receiver name (seen 2x "r", 4x "w") (stylecheck)
func (w *writeErrorConn) Close() error {
^
This PR adds missing dots at the end of comments. Also, enables
godot
linter to ensure comments always end with a full stop. Additionally, enablesstylecheck
issue to ensure comments always start with a function name.The full log of running
golangci-lint
: