Documentation ¶
Index ¶
- Variables
- func CheckResponse(err error, expectedStatusCode int, response *http.Response)
- func EnvVarExamplesHelpMessage(name string) string
- func ExactArgs(cmd *cobra.Command, args []string, l int)
- func ExpectDependency(logger logrus.FieldLogger, dependencies ...interface{})
- 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 ¶
View Source
var ErrNilDependency = errors.New("a dependency was expected to be defined but is nil. Please open an issue with the stack trace")
ErrNilDependency is returned if a dependency is missing.
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 ExpectDependency ¶ added in v0.0.37
func ExpectDependency(logger logrus.FieldLogger, dependencies ...interface{})
ExpectDependency expects every dependency to be not nil or it fatals.
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.