Documentation
¶
Index ¶
- func ExecuteWithArgs(cmd *cobra.Command, args ...string) (out []byte, err error)
- func FormatFloat64(f float64) string
- func LookupFlagBool(cmd *cobra.Command, flagName string) (bool, error)
- func LookupFlagInt(cmd *cobra.Command, flagName string) (int, error)
- func NewRateLimiter(every time.Duration, calls int) *rate.Limiter
- func OptionalInt(i ...int) *int
- func OptionalIntWithDefault(def int, i ...int) int
- func OptionalString(i ...string) *string
- func OptionalStringWithDefault(def string, i ...string) string
- func Printf(cmd *cobra.Command, format string, a ...interface{}) error
- func Println(cmd *cobra.Command, a ...interface{}) error
- func Readdir(dirPath string) ([]string, error)
- func ToLowerCaseAll(ss []string) []string
- func WrapErr(err error) func(interface{}) error
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteWithArgs ¶
ExecuteWithArgs allows to test commands properly and individually Great reference: https://gianarb.it/blog/golang-mockmania-cli-command-with-cobra
func FormatFloat64 ¶
func OptionalInt ¶
func OptionalIntWithDefault ¶
func OptionalString ¶
func ToLowerCaseAll ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.