Documentation ¶
Index ¶
- Constants
- func CheckArgs(args []string, minimum int)
- func ConvertKeyValuePairArgSliceToMap(keyvals []string) map[string]string
- func Debug(msg string)
- func DebugLn(msg string)
- func Execute()
- func ExitOn(err error)
- func ExitOnError(err error, action string)
- func ExitOnErrorWithDetail(err error, action, stdout, errout string)
- func Failure(msg string)
- func GetAuthenticatedService() (*client.PasswordService, error)
- func IndentRed(msg string)
- func Info(msg string)
- func Log(msg string)
- func Newline()
- func Print(msg string)
- func PrintIndent(msg string)
- func Println(msg string)
- func ReadAuthToken() (*model.AuthToken, error)
- func RecursiveName(cmd *cobra.Command) string
- func Success(msg string)
- func UpdateExampleOnChildren(currCmd *cobra.Command)
- func WriteAuthToken(authToken *model.AuthToken) error
Constants ¶
View Source
const ( // DEBUG is debug log level DEBUG = 2 // INFO is info log level INFO = 1 // NONE is no logging NONE = 0 )
Variables ¶
This section is empty.
Functions ¶
func ConvertKeyValuePairArgSliceToMap ¶
ConvertKeyValuePairArgSliceToMap converts slice of key=value to map
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ExitOnErrorWithDetail ¶
ExitOnErrorWithDetail exits when error occurs, prints addtional info
func GetAuthenticatedService ¶
func GetAuthenticatedService() (*client.PasswordService, error)
GetAuthenticatedService ensures returned service client is authenticated
func Println ¶
func Println(msg string)
Println prints specified message with line before the message
func RecursiveName ¶
RecursiveName travels up the parent chain to retrieve name
func UpdateExampleOnChildren ¶
UpdateExampleOnChildren updates children's example using parent name recursively
func WriteAuthToken ¶
WriteAuthToken reads auth token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.