fix: linting and go test
This commit is contained in:
1 parent
b427353672
commit
f73928103a
4 files changed
+16
-3
No files matched your search
@@ -68,7 +68,7 @@ func ObserveRequestDuration(duration time.Duration) {
|
||||
func WrapRequestTiming(next http.HandlerFunc) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
startedAt := time.Now()
|
||||
defer ObserveRequestDuration(time.Since(startedAt))
|
||||
defer func() { ObserveRequestDuration(time.Since(startedAt)) }()
|
||||
next(w, r)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user