Documentation
¶
Index ¶
- Constants
- func AddConfigFlags(cmd *cobra.Command, serviceAddress string)
- func CaptureOutput(capture io.Writer)
- func CreateConfig(verbose bool) error
- func GetConfigCommand() *cobra.Command
- func GetOutput() io.Writer
- func InitConfig(configNameInit string)
- func Output(msg string, args ...interface{})
- func SetConfigDir(relativePath string)
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 ¶
AddConfigFlags :
func CaptureOutput ¶
CaptureOutput allows a test harness to redirect output to an alternate source for testing
func CreateConfig ¶
CreateConfig creates a CLI config file including its parent directory if necessary. It is idempotent.
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.
Click to show internal directories.
Click to hide internal directories.