Skip to content

Commit 3229554

Browse files
Update lint
Signed-off-by: Łukasz Gryglicki <[email protected]>
1 parent 4e4e80e commit 3229554

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cla-backend-go/cmd/response_metrics.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ func requestStart(reqID, method string) {
3737
// getRequestMetrics returns the response metrics based on the request id value
3838
func getRequestMetrics(reqID string) *responseMetrics {
3939
if val, found := reqMap.Load(reqID); found {
40-
rm := val.(*responseMetrics)
40+
rm, ok := val.(*responseMetrics)
41+
if !ok {
42+
return nil
43+
}
4144
now, _ := utils.CurrentTime()
4245
rm.elapsed = now.Sub(rm.start)
4346
return rm

0 commit comments

Comments
 (0)