Added unit tests, documentation and function descriptions across the board. Increased cyclop complexity threshold to 15 which is a bit more sane than 10 and excluded _test.go files from linters.
This commit is contained in:
1 parent
005b335371
commit
7fd321df97
31 files changed
+4106
-1
No files matched your search
@@ -65,6 +65,9 @@ func clientKey(req *http.Request) string {
|
||||
return host
|
||||
}
|
||||
|
||||
// AccessLog wraps next, writing a line to logger for each request in the
|
||||
// Apache/nginx Common Log Format, or the Combined Log Format (which adds the
|
||||
// referer and user agent) if combined is true.
|
||||
func AccessLog(logger *log.Logger, combined bool, next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
start := time.Now()
|
||||
|
||||
Reference in new issue
Block a user