Documentation ¶
Index ¶
- func CheckResponse(err error, expectedStatusCode int, response *http.Response)
- func EnvVarExamplesHelpMessage(name string) string
- func ExactArgs(cmd *cobra.Command, args []string, l int)
- func Fatalf(message string, args ...interface{})
- func FormatResponse(o interface{}) string
- func MinArgs(cmd *cobra.Command, args []string, min int)
- func Must(err error, message string, args ...interface{})
- func RangeArgs(cmd *cobra.Command, args []string, r []int)
- func Version(gitTag, gitHash, buildTime *string) *cobra.Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
CheckResponse fatals if err is nil or the response.StatusCode does not match the expectedStatusCode
func EnvVarExamplesHelpMessage ¶
EnvVarExamplesHelpMessage returns a string containing documentation on how to use environment variables.
func Fatalf ¶
func Fatalf(message string, args ...interface{})
Fatalf prints to os.Stderr and exists with code 1.
func FormatResponse ¶
func FormatResponse(o interface{}) string
FormatResponse takes an object and prints a json.MarshalIdent version of it or fatals.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.