utils

package
v0.0.0-...-f1100e8 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DClose

func DClose(c io.Closer)

func DoesNotExist

func DoesNotExist(err error) bool

DoesNotExist reports whether the error is related to absence of file.

func MapRegexMatches

func MapRegexMatches(r *regexp.Regexp, v string) (m map[string]string)

func NewUUID

func NewUUID() string

func NewWrappedError

func NewWrappedError(message string, cause error) error

func StrictDecodeJSON

func StrictDecodeJSON(data []byte, out interface{}) error

func TraverseCauses

func TraverseCauses(err error, check func(input error) error) error

TraverseCauses calls a check function on error, which supposed to read the cause error and return it, a filter might be added, which would prevent to traversing down, this method will also return if the same error as input is returned.

func Unpack

func Unpack[T any](arr []T, vars ...*T)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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