Skip to content

Commit

Permalink
Address vet issues found in Go 1.22 (#2907)
Browse files Browse the repository at this point in the history
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
  • Loading branch information
mikkeloscar authored Feb 7, 2024
1 parent 3082a04 commit 81aa6a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/webhook/admission/admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ func Handler(admitter admitter) http.HandlerFunc {
}

start := time.Now()
defer admissionDuration.With(labelValues).Observe(float64(time.Since(start)) / float64(time.Second))
defer func() {
admissionDuration.With(labelValues).Observe(float64(time.Since(start)) / float64(time.Second))
}()

admResp, err := admitter.admit(request)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions proxy/longpoll_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func cancelableRequest(
ctx, cancel := stdlibcontext.WithCancel(stdlibcontext.Background())
req, err := http.NewRequestWithContext(ctx, method, url, body)
if err != nil {
cancel()
return nil, err
}

Expand Down

0 comments on commit 81aa6a5

Please sign in to comment.