cli

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// AuthHeaderFlag - the flag name
	AuthHeaderFlag = "auth-header"

	// Authorization the header keyword
	Authorization = "authorization"
)
View Source
const (
	// ExitSuccess means nominal status
	ExitSuccess = iota

	// ExitError means general error
	ExitError

	// ExitBadConnection means failed connection to remote service
	ExitBadConnection

	// ExitBadArgs means invalid argument values were given
	ExitBadArgs = 128
)

Variables

This section is empty.

Functions

func AddConfigFlags

func AddConfigFlags(cmd *cobra.Command, serviceAddress string)

AddConfigFlags :

func CaptureOutput

func CaptureOutput(capture io.Writer)

CaptureOutput allows a test harness to redirect output to an alternate source for testing

func CreateConfig

func CreateConfig(verbose bool) error

CreateConfig creates a CLI config file including its parent directory if necessary. It is idempotent.

func GetConfigCommand

func GetConfigCommand() *cobra.Command

GetConfigCommand :

func GetOutput

func GetOutput() io.Writer

GetOutput returns the current output writer

func InitConfig

func InitConfig(configNameInit string)

InitConfig :

func Output

func Output(msg string, args ...interface{})

Output prints the specified format message with arguments to stdout.

func SetConfigDir

func SetConfigDir(relativePath string)

SetConfigDir sets the name of the config directory as a relative path under the home directory where the config file will be created/expected.

Types

This section is empty.

Jump to

Keyboard shortcuts

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