Skip to content

Commit 4f4ee76

Browse files
joe-elliottjtlisi
authored andcommitted
Removed unnecessary err check
Signed-off-by: Joe Elliott <[email protected]> Signed-off-by: Jacob Lisi <[email protected]>
1 parent f8f8930 commit 4f4ee76

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/configs/client/client.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,10 @@ func doRequest(endpoint string, timeout time.Duration, since configs.ID, operati
101101

102102
start := time.Now()
103103
resp, err := client.Do(req)
104-
if resp != nil {
105-
configsRequestDuration.WithLabelValues(operation, resp.Status).Observe(time.Since(start).Seconds())
106-
}
107104
if err != nil {
108105
return nil, err
109106
}
107+
configsRequestDuration.WithLabelValues(operation, resp.Status).Observe(time.Since(start).Seconds())
110108
defer resp.Body.Close()
111109

112110
if resp.StatusCode != http.StatusOK {

0 commit comments

Comments
 (0)