Files
opentf/internal/flock
Martin Atkins b2c20bda29 flock: Partially-manual modernization of waitgroup usage
The "go fix" modernizer for using wg.Go instead of explicit wg.Add/wg.Done
only works when the goroutine function has no arguments, so it didn't match
here where this code was still using an old trick to ensure that each
goroutine would capture a different value of "i".

But that old trick isn't needed anymore because modern Go already ensures
that each iteration of the loop has an independent "i", so I made a small
change to remove the argument and just let the closure capture "i" from
the outer loop, and then "go fix" was able to complete the rewrite to
use wg.Go here.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2026-03-17 15:25:09 -07:00
..