Naming, layout and comments: descriptive full-word names, one item per line in wrapped calls and literals, and doc comments on exported names

Short and single-letter names in application code become full words (tests
keep theirs). Wrapped calls, signatures and composite literals put one item
per line, and one-line function bodies are expanded. Exported names and
groups of constants get doc comments, and comments refer to the renamed
identifiers.
This commit is contained in:
bwilliams committed 2026-10-15 16:12:56 +01:00
1 parent 043e307663
commit 465358609a
78 files changed
+2374 -1402

No files matched your search

+6 -3
View File
@@ -15,10 +15,13 @@ const sleepDuration = 60 * time.Second
// runSleeper runs the sleeper test source until ctx is cancelled: every
// configured interval it simulates work by sleeping for sleepDuration.
func runSleeper(
ctx context.Context, logger *slog.Logger, conf *config.JobSearchConfig, since time.Time,
ctx context.Context,
logger *slog.Logger,
conf *config.JobSearchConfig,
since time.Time,
) error {
blockShutdown := conf.Sources.Sleeper.BlockShutdown
w := util.Worker{
worker := util.Worker{
Logger: logger,
Name: "Sleeper",
Interval: conf.Sources.Sleeper.Interval,
@@ -30,7 +33,7 @@ func runSleeper(
}
},
}
return w.Run(ctx, since)
return worker.Run(ctx, since)
}
// sleep simulates work taking duration, returning early with ctx.Err() if ctx