Added unit tests, documentation and function descriptions across the board. Increased cyclop complexity threshold to 15 which is a bit more sane than 10 and excluded _test.go files from linters.

This commit is contained in:
bwilliams committed 2026-10-09 18:27:51 +01:00
1 parent 005b335371
commit 7fd321df97
31 files changed
+4106 -1

No files matched your search

+3
View File
@@ -30,6 +30,9 @@ func runSleeper(
return w.Run(ctx, since)
}
// sleep simulates work taking duration, returning early with ctx.Err() if ctx
// is cancelled. With blockShutdown, the work itself ignores ctx (as a
// non-cooperative call would) and only the wait for it stops.
func sleep(
ctx context.Context, blockShutdown bool, duration time.Duration,
) error {