Documentation
¶
Index ¶
- func CoalesceErr(errs ...error) error
- func EnvIsTrue(key string) bool
- func GenerateRandAlphaNumericKey(n int) (string, error)
- func GenerateRandCode(n int) string
- func GenerateRandDBName() (string, error)
- func GenerateRandEmail() string
- func GenerateRandPassword() (string, error)
- func GenerateRandPhoneNumber() string
- func GetAbsolutePath(filePath string) string
- func GetEnv(key, defaultValue string) string
- func GetPathToScript(path string, fromTest bool) string
- func GoSchemaKill(v interface{})
- func StringsEqual(slice, slice2 []string) bool
- func WrapBlack(text string) string
- func WrapBlue(text string) string
- func WrapBrightGreen(text string) string
- func WrapBrightRed(text string) string
- func WrapCyan(text string) string
- func WrapGreen(text string) string
- func WrapMagenta(text string) string
- func WrapRed(text string) string
- func WrapWhite(text string) string
- func WrapYellow(text string) string
- type Color
- type ErrorList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoalesceErr ¶
CoalesceErr takes a variable numbers of errors and returns an error
func GenerateRandAlphaNumericKey ¶
Generate a random alphanumeric string
func GenerateRandCode ¶
Generate a random integer code of length n
func GenerateRandDBName ¶
func GenerateRandEmail ¶
func GenerateRandEmail() string
func GenerateRandPassword ¶
func GenerateRandPhoneNumber ¶
func GenerateRandPhoneNumber() string
func GetAbsolutePath ¶
func GetPathToScript ¶
path should be scripts/... e.g. scripts/custom_graphql.ts
func GoSchemaKill ¶
func GoSchemaKill(v interface{})
panic not ok in typescript path. ok in golang since that's deprecated and not updated using a different API to make it easier to grep/etc
func StringsEqual ¶
func WrapBrightGreen ¶ added in v0.1.6
func WrapBrightRed ¶ added in v0.1.6
func WrapMagenta ¶ added in v0.1.6
func WrapYellow ¶ added in v0.1.6
Types ¶
type Color ¶ added in v0.1.6
type Color string
const ( // colors from https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html#8-colors Black Color = "\033[030m" Red Color = "\033[31m" Green Color = "\033[32m" Yellow Color = "\033[33m" Blue Color = "\033[34m" Magenta Color = "\033[35m" Cyan Color = "\033[36m" White Color = "\033[37m" Reset Color = "\033[0m" BrightBlack Color = "\033[30;1m" BrightRed Color = "\033[31;1m" BrightGreen Color = "\033[32;1m" BrightYellow Color = "\033[33;1m" BrightBlue Color = "\033[34;1m" BrightMagenta Color = "\033[35;1m" BrightCyan Color = "\033[36;1m" BrightWhite Color = "\033[37;1m" )
Click to show internal directories.
Click to hide internal directories.