Documentation
¶
Index ¶
- func AddForceFlag(cmd *cobra.Command, force *bool)
- func AddOutputFlag(cmd *cobra.Command, format *string)
- func AddPaginationFlags(cmd *cobra.Command, limit, offset *int)
- func ConfirmAction(in io.Reader, errOut io.Writer, message string) bool
- func FormatError(err error) string
- type Factory
- type IOStreams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddForceFlag ¶
AddForceFlag adds the --force/-f flag to a command.
func AddOutputFlag ¶
AddOutputFlag adds the --output/-o flag to a command.
func AddPaginationFlags ¶
AddPaginationFlags adds --limit and --offset flags to a command.
func ConfirmAction ¶
ConfirmAction prompts the user to confirm a destructive action. Returns true if the user confirms with "y" or "yes". If in is not interactive or the user declines, returns false.
func FormatError ¶
FormatError converts an API error into a user-friendly message.
Types ¶
type Factory ¶
type Factory struct {
ConfigPath string
Verbose bool
IOStreams *IOStreams
// contains filtered or unexported fields
}
Factory provides lazy access to configuration, API client, and output printer.
func NewFactory ¶
func NewFactory() *Factory
NewFactory creates a new Factory with default I/O streams.
func (*Factory) DebugLogger ¶
DebugLogger returns the debug logger, creating it on first call.
Click to show internal directories.
Click to hide internal directories.