Documentation
¶
Index ¶
- func AddCommand(cmd *cobra.Command)
- func AddFormatFlag(cmd *cobra.Command)
- func AddLoggingFlags(cmd *cobra.Command)
- func AddOutputFlag(cmd *cobra.Command, usage string)
- func AddPagesFlag(cmd *cobra.Command, usage string)
- func AddPasswordFlag(cmd *cobra.Command, usage string)
- func AddStdoutFlag(cmd *cobra.Command)
- func DryRunPrint(format string, args ...interface{})
- func Execute() error
- func Force() bool
- func GetFormat(cmd *cobra.Command) string
- func GetLogFormat() string
- func GetLogLevel() string
- func GetOutput(cmd *cobra.Command) string
- func GetPages(cmd *cobra.Command) string
- func GetPassword(cmd *cobra.Command) string
- func GetRootCmd() *cobra.Command
- func GetStdout(cmd *cobra.Command) bool
- func InitLogging()
- func IsDryRun() bool
- func PrintProgress(operation string)
- func PrintStatus(format string, args ...interface{})
- func PrintVerbose(format string, args ...interface{})
- func Progress() bool
- func SetVersion(v, c, d string)
- func Verbose() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommand ¶
AddCommand adds a subcommand to the root command
func AddFormatFlag ¶ added in v1.4.0
AddFormatFlag adds the --format flag to a command for structured output.
func AddLoggingFlags ¶ added in v1.5.0
AddLoggingFlags adds --log-level and --log-format persistent flags to a command.
func AddOutputFlag ¶
AddOutputFlag adds the -o/--output flag to a command
func AddPagesFlag ¶
AddPagesFlag adds the -p/--pages flag to a command
func AddPasswordFlag ¶
AddPasswordFlag adds the --password flag to a command
func AddStdoutFlag ¶ added in v1.4.0
AddStdoutFlag adds the --stdout flag to a command for binary stdout output.
func DryRunPrint ¶ added in v1.5.0
func DryRunPrint(format string, args ...interface{})
DryRunPrint prints a dry-run message to stderr
func GetLogFormat ¶ added in v1.5.0
func GetLogFormat() string
GetLogFormat returns the log format flag value.
func GetLogLevel ¶ added in v1.5.0
func GetLogLevel() string
GetLogLevel returns the log level flag value.
func GetPassword ¶
GetPassword gets the password flag value
func InitLogging ¶ added in v1.5.0
func InitLogging()
InitLogging initializes the logging system from flags.
func IsDryRun ¶ added in v1.5.0
func IsDryRun() bool
IsDryRun returns whether dry-run mode is enabled
func PrintProgress ¶ added in v1.3.1
func PrintProgress(operation string)
PrintProgress prints a progress message (shown in verbose mode or for long operations)
func PrintStatus ¶ added in v1.3.1
func PrintStatus(format string, args ...interface{})
PrintStatus prints a status message to stderr (always shown)
func PrintVerbose ¶
func PrintVerbose(format string, args ...interface{})
PrintVerbose prints a message if verbose mode is enabled
Types ¶
This section is empty.