helpers

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOptions added in v0.2.2

func ApplyOptions[T any](service *T, options []func(*T)) *T

func AssertIsDefined

func AssertIsDefined(value any, message ...string)

func CloneMap added in v0.1.0

func CloneMap[K comparable, V any](data map[K]V) map[K]V

func CloseSafe added in v0.1.0

func CloseSafe(resource io.Closer)

func FPrint added in v0.2.0

func FPrint(w io.Writer, payload ...any)

func FPrintf added in v0.2.0

func FPrintf(w io.Writer, format string, a ...any)

func FPrintln added in v0.2.0

func FPrintln(w io.Writer, a ...any)

func GracefulShutdown added in v0.2.0

func GracefulShutdown(ctx context.Context, shutdownFunc func(ctx context.Context) error) error

func Is1xxCode added in v0.2.0

func Is1xxCode(code int) bool

func Is2xxCode added in v0.2.0

func Is2xxCode(code int) bool

func Is3xxCode added in v0.2.0

func Is3xxCode(code int) bool

func Is4xxCode added in v0.2.0

func Is4xxCode(code int) bool

func Is5xxCode added in v0.2.0

func Is5xxCode(code int) bool

func NormaliseRequest added in v0.1.0

func NormaliseRequest(request *http.Request)

func PanicInterceptor added in v0.2.0

func PanicInterceptor(action func(any))

func PassedOrOsFs added in v0.2.0

func PassedOrOsFs(fs *afero.Fs)

func Sprintf added in v0.2.0

func Sprintf(format string, a ...any) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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