util

package
v0.0.38-alpha3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 12 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 CoalesceErrSlice

func CoalesceErrSlice(err []packages.Error) error

func ErrSlice

func ErrSlice(err []packages.Error)

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