Repository navigation
v0.7.5
Bug Fixes
-
Conditional reassignment detection: Fixed false negatives when variables holding closures are conditionally reassigned
- Previously, only the last assignment was checked
- Now checks ALL assignments from the last unconditional assignment onwards
- Affects:
goroutine,errgroup,spawnercheckers
-
Factory pattern conditional reassignment: Fixed detection in factory functions that return conditionally reassigned variables
- Previously short-circuited when finding any nested func literal using context
- Now correctly checks only what's actually returned
- Added recursive context-checking for nested factories (triple higher-order patterns)
Example
func example(ctx context.Context) {
fn := func() { _ = ctx } // uses ctx
if condition {
fn = func() { /* no ctx */ } // doesn't use ctx
}
go fn() // Now correctly warns: not all paths use ctx
}Full Changelog: v0.7.4...v0.7.5