Skip to content

Conversation

cuishuang
Copy link
Contributor

Changes proposed by this PR

fix the mistakes in defer statements

more infomation: https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/defers

closes #

  • done
  • todo

Notes to reviewer

Release Note

Signed-off-by: cuishuang <imcusg@gmail.com>
@cuishuang cuishuang requested a review from a team as a code owner September 19, 2024 08:16
@marco-m-pix4d
Copy link
Contributor

Ah, nice catch @cuishuang !
Before the fix, the code was calling time.Since(startTime) immediately. With the fix, the time delta is calculated when the deferred function is invoked.

@xtremerui xtremerui added the bug label Oct 18, 2024
@xtremerui xtremerui merged commit b89f83a into concourse:master Oct 18, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants