Documentation ¶
Overview ¶
Some useful logical operation for data processing
Index ¶
- func All(bs ...func() bool) (int, bool)
- func Chain(fnList ...func() error) error
- func ChainWithoutWrapper(fnList ...func() error) error
- func Diff[T any, K comparable](list1 []T, list2 []T, Key func(item T) K) (noInList1, noInList2 []T)
- func Go(fn func())
- func GoWithAction(fn func(), panicAction func(r interface{}))
- func Max[T constraints.Ordered](a, b T) T
- func NowInMs() uint64
- func NowInSec() uint64
- func PanicIf(err error)
- func Retry(maxRetry uint, timeWait time.Duration, action func() error, errHint string) error
- func StrOrDefault(str string, other string) string
- type ChainError
- type Default
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChainWithoutWrapper ¶
ChainWithoutWrapper Return error instead of a wrapper.
func Diff ¶
func Diff[T any, K comparable](list1 []T, list2 []T, Key func(item T) K) (noInList1, noInList2 []T)
func GoWithAction ¶
func GoWithAction(fn func(), panicAction func(r interface{}))
func Max ¶
func Max[T constraints.Ordered](a, b T) T
func StrOrDefault ¶
Types ¶
type ChainError ¶
func (*ChainError) Error ¶
func (ce *ChainError) Error() string
type Default ¶
type Default interface { constraints.Ordered }
Click to show internal directories.
Click to hide internal directories.