Documentation ¶
Index ¶
- func Absolute[T int | int8 | int16 | int32 | int64 | float32 | float64](value T) T
- func ArrayContains[T ~string | int | int8 | int16 | int32 | int64 | float32 | float64](set []T, value T) bool
- func CheckIfFilesExists(files ...string) error
- func Concurrent[T any](ctx context.Context, array []T, concurrency int, ...) error
- func ConcurrentC[T any](ctx context.Context, next *Next[T], concurrency int, ...) error
- func ConcurrentF(ctx context.Context, functions ...CtxFunc) error
- func ConcurrentInGroup[T any](group *CxGroup, array []T, execute func(ctx context.Context, one T) error)
- func FindInArray[T any](set []T, match func(elem T) bool) (int, bool)
- func IsInstance(val any, typ reflect.Kind) bool
- func IsOfType(object interface{}, decidingKey string) (bool, error)
- func IsSubset[T comparable](setArray, subsetArray []T) bool
- func MaxDate(v1, v2 time.Time) time.Time
- func Unmarshal(from interface{}, object interface{}) error
- func UnmarshalFile(file string, dest any) error
- func Validate[T any](structure T) error
- type CtxFunc
- type CxGroup
- type Hashable
- type Identifier
- type Logger
- type Next
- type Set
- func (this *Set[T]) Array() []T
- func (this *Set[T]) Difference(set *Set[T]) *Set[T]
- func (this *Set[T]) Exists(element T) bool
- func (this *Set[T]) Hash(elem T) string
- func (this *Set[T]) Insert(element T)
- func (this *Set[T]) Intersection(set *Set[T]) *Set[T]
- func (this *Set[T]) Len() int
- func (this *Set[T]) MarshalJSON() ([]byte, error)
- func (this *Set[T]) ProperSubsetOf(set *Set[T]) bool
- func (this *Set[T]) Range(f func(T))
- func (this *Set[T]) Remove(element T)
- func (this *Set[T]) String() string
- func (this *Set[T]) SubsetOf(set *Set[T]) bool
- func (this *Set[T]) Union(set *Set[T]) *Set[T]
- func (this *Set[T]) UnmarshalJSON(data []byte) error
- func (this *Set[T]) WithHasher(f func(T) string) *Set[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayContains ¶
func CheckIfFilesExists ¶
func Concurrent ¶
func ConcurrentC ¶ added in v0.0.2
func ConcurrentF ¶ added in v0.0.15
func ConcurrentInGroup ¶ added in v0.0.17
func IsSubset ¶
func IsSubset[T comparable](setArray, subsetArray []T) bool
func Unmarshal ¶
func Unmarshal(from interface{}, object interface{}) error
Unmarshal serializes and deserializes any from into the object return error if occurred
func UnmarshalFile ¶
Types ¶
type CxGroup ¶ added in v0.0.16
type CxGroup struct {
// contains filtered or unexported fields
}
func NewCGroupWithLimit ¶ added in v0.0.16
type Identifier ¶ added in v0.0.5
type Identifier interface {
ID() string
}
type Logger ¶
type Logger interface { Info(v ...interface{}) Infof(format string, v ...interface{}) Debug(v ...interface{}) Debugf(format string, v ...interface{}) Error(v ...interface{}) Fatal(v ...interface{}) Fatalf(format string, v ...interface{}) Errorf(format string, v ...interface{}) Warn(v ...interface{}) Warnf(format string, v ...interface{}) }
type Set ¶ added in v0.0.5
type Set[T comparable] struct { // contains filtered or unexported fields }
func (*Set[T]) Difference ¶ added in v0.0.5
Find the difference between two sets
func (*Set[T]) Insert ¶ added in v0.0.5
func (this *Set[T]) Insert(element T)
Add an element to the set
func (*Set[T]) Intersection ¶ added in v0.0.5
Find the intersection of two sets
func (*Set[T]) MarshalJSON ¶ added in v0.0.5
func (*Set[T]) ProperSubsetOf ¶ added in v0.0.5
Test whether or not this set is a proper subset of "set"
func (*Set[T]) Range ¶ added in v0.0.5
func (this *Set[T]) Range(f func(T))
Call f for each item in the set
func (*Set[T]) Remove ¶ added in v0.0.5
func (this *Set[T]) Remove(element T)
Remove an element from the set
func (*Set[T]) UnmarshalJSON ¶ added in v0.0.5
func (*Set[T]) WithHasher ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.