Files
moby/pkg/jsonmessage
Sebastiaan van Stijn 1ffbcb566b pkg/jsonmessage: fix "Multiplication of durations" (durationcheck)
pkg/jsonmessage/jsonmessage.go:111:10: Multiplication of durations: `(left / time.Second) * time.Second` (durationcheck)
            left = (left / time.Second) * time.Second
                   ^

This code was rounding down time remaining to the nearest second;

- Use go's time.Duration.Round() instead
- Make the calculation conditional, as it was only used if there's enough
  space available to print
- Move the declaration of the timeLeftBox var closer to where used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-09 13:22:48 +01:00
..