util

package
v0.1.0-alpha.59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoalesceErr

func CoalesceErr(errs ...error) error

CoalesceErr takes a variable numbers of errors and returns an error

func EnvIsTrue added in v0.0.38

func EnvIsTrue(key string) bool

func GenerateRandAlphaNumericKey

func GenerateRandAlphaNumericKey(n int) (string, error)

Generate a random alphanumeric string

func GenerateRandCode

func GenerateRandCode(n int) string

Generate a random integer code of length n

func GenerateRandDBName

func GenerateRandDBName() (string, error)

func GenerateRandEmail

func GenerateRandEmail() string

func GenerateRandPassword

func GenerateRandPassword() (string, error)

func GenerateRandPhoneNumber

func GenerateRandPhoneNumber() string

func GetAbsolutePath

func GetAbsolutePath(filePath string) string

func GetEnv

func GetEnv(key, defaultValue string) string

func GetPathToScript

func GetPathToScript(path string, fromTest bool) string

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 StringsEqual(slice, slice2 []string) bool

Types

type ErrorList

type ErrorList struct {
	// contains filtered or unexported fields
}

ErrorList encompasses a list of errors. It's also an error

func (*ErrorList) Error

func (e *ErrorList) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL