cli

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommand

func AddCommand(cmd *cobra.Command)

AddCommand adds a subcommand to the root command

func AddFormatFlag added in v1.4.0

func AddFormatFlag(cmd *cobra.Command)

AddFormatFlag adds the --format flag to a command for structured output.

func AddOutputFlag

func AddOutputFlag(cmd *cobra.Command, usage string)

AddOutputFlag adds the -o/--output flag to a command

func AddPagesFlag

func AddPagesFlag(cmd *cobra.Command, usage string)

AddPagesFlag adds the -p/--pages flag to a command

func AddPasswordFlag

func AddPasswordFlag(cmd *cobra.Command, usage string)

AddPasswordFlag adds the --password flag to a command

func AddStdoutFlag added in v1.4.0

func AddStdoutFlag(cmd *cobra.Command)

AddStdoutFlag adds the --stdout flag to a command for binary stdout output.

func Execute

func Execute() error

Execute runs the root command

func Force

func Force() bool

Force returns whether force mode is enabled

func GetFormat added in v1.4.0

func GetFormat(cmd *cobra.Command) string

GetFormat gets the format flag value.

func GetOutput

func GetOutput(cmd *cobra.Command) string

GetOutput gets the output flag value

func GetPages

func GetPages(cmd *cobra.Command) string

GetPages gets the pages flag value

func GetPassword

func GetPassword(cmd *cobra.Command) string

GetPassword gets the password flag value

func GetRootCmd

func GetRootCmd() *cobra.Command

GetRootCmd returns the root command for testing

func GetStdout added in v1.4.0

func GetStdout(cmd *cobra.Command) bool

GetStdout gets the stdout flag value.

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

func Progress added in v1.3.1

func Progress() bool

Progress returns whether progress bar is enabled

func SetVersion

func SetVersion(v, c, d string)

SetVersion sets the version info from build flags

func Verbose

func Verbose() bool

Verbose returns whether verbose mode is enabled

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL