Skip to content

feat(pass): add optional client timeout to run command - #610

Merged
joe0BAB merged 1 commit into
mainfrom
feat/run-timeout
Aug 6, 2026
Merged

feat(pass): add optional client timeout to run command#610
joe0BAB merged 1 commit into
mainfrom
feat/run-timeout

Conversation

@joe0BAB

@joe0BAB joe0BAB commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Add a RunOption to RunCommand so callers can forward a request timeout to client.New via client.WithTimeout. When the option is not provided, the client's default request timeout applies; a timeout of 0 disables the request timeout.

Add a RunOption to RunCommand so callers can forward a request timeout
to client.New via client.WithTimeout. When the option is not provided,
the client's default request timeout applies; a timeout of 0 disables
the request timeout.

Signed-off-by: Johannes Großmann <grossmann.johannes@t-online.de>
@joe0BAB
joe0BAB marked this pull request as ready for review August 6, 2026 11:21

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

The implementation is clean and correct. Key points verified by the review:

  • Pointer-to-Duration for zero-value semantics: *time.Duration correctly distinguishes "option not provided" (nil) from "timeout of 0" (disables the request timeout), matching the documented behavior.
  • No aliasing bug: The option closure captures the duration value before taking its address — safe and idiomatic Go.
  • Correct nil guard: client.WithTimeout is only appended when the option is non-nil, preserving the default client timeout when no option is passed.
  • go.work.sum: Only checksum additions for transitive dependencies — no logic changes.

No bugs, logic errors, resource leaks, or security issues introduced by this PR.

@joe0BAB
joe0BAB merged commit 59f6a69 into main Aug 6, 2026
20 checks passed
@joe0BAB
joe0BAB deleted the feat/run-timeout branch August 6, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants