goutils

package module
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 3 Imported by: 16

README

go-utils

common helper utilities in go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert added in v0.0.4

func Assert(err error)

func MarshalJSONToMap added in v0.0.7

func MarshalJSONToMap(ent interface{}, m map[string]interface{})

func RecoverToErr

func RecoverToErr(err *error)

func Retry added in v0.0.8

func Retry(fn func(), cfg *RetryConfig)

func Try added in v0.0.5

func Try(fn func()) error

func UnmarshalJSONFromMap added in v0.0.6

func UnmarshalJSONFromMap(m map[string]interface{}, ent interface{})

func UnwrapType added in v0.0.2

func UnwrapType(raw reflect.Type) reflect.Type

func UnwrapValue added in v0.0.2

func UnwrapValue(raw reflect.Value) reflect.Value

Types

type RetryConfig added in v0.0.8

type RetryConfig struct {
	// simple retry configs
	Attempts uint
	Interval time.Duration
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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