Documentation
¶
Overview ¶
Package cli provides utilities for CLI tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Should ¶
func Should(err error)
Should panics if err != nil
Should is useful when error should never happen in customer environment, it can only be development error.
func WithContextC ¶ added in v1.14.0
func WithContextC(ctx context.Context, f func(context.Context) (*cobra.Command, error)) (*cobra.Command, error)
WithContextC wraps function call to provide a context cancellable with SIGTERM (Ctrl^C) or SIGINT. Returns the resolved command and error from the function call.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.