Documentation
¶
Overview ¶
Package ctxutil provides small helpers for consistent context.Context handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OrBackground ¶
OrBackground centralizes the repo's nil-context fallback convention: it returns context.Background() when ctx is nil, otherwise it returns ctx unchanged. Use this instead of duplicating the inline
if ctx == nil {
ctx = context.Background()
}
pattern at call sites.
func StartOperation ¶
StartOperation reports an operation when the context has an observer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.