docs(help): trim examples and verbose doc comments in core commands

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 20:48:00 +02:00
1 parent a0d4e85605
commit fa9cb4f852
7 files changed
+22 -57

No files matched your search

+3 -4
View File
@@ -145,9 +145,8 @@ func unreachable(err error) string {
return ""
}
// timeoutError words an expired --timeout as "timed out after 4s waiting for run 34" instead
// of "context deadline exceeded". Other errors are returned unchanged; the result still matches
// context.DeadlineExceeded, so the exit code stays the same.
// timeoutError words an expired --timeout as "timed out after 4s waiting for run 34" instead of
// "context deadline exceeded", keeping the exit code. Other errors are returned unchanged.
func timeoutError(err error, d time.Duration, format string, args ...any) error {
if !errors.Is(err, context.DeadlineExceeded) {
return err
@@ -156,7 +155,7 @@ func timeoutError(err error, d time.Duration, format string, args ...any) error
if format != "" {
text += " " + fmt.Sprintf(format, args...)
}
return &explainedError{text: text, err: err}
return explain(err, "%s", text)
}
// shortDuration formats d without zero units, such as 1h, 1h30m or 45s.