Skip to content
Discussion options

You must be logged in to vote

The govet (defers analyzer) caught this:

$ golangci-lint run --enable-only govet
issue6268/main.go:16:67: defers: call to time.Since is not deferred (govet)
        defer fmt.Println("❌ Incorrect Value (Immediate Evaluation):", time.Since(start))
                                                                         ^
1 issues:
* govet: 1

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alexandear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants