Documentation ¶
Index ¶
- func CalculateBusinessDaysBetweenDates(from, to time.Time) int
- func CopyMap(input map[string]interface{}) map[string]interface{}
- func ElementExists(slice []interface{}, el interface{}) bool
- func ForceBool(list map[string]interface{}, key string, defaultVal bool) bool
- func ForceFloat(list map[string]interface{}, key string, defaultVal float64) float64
- func ForceInt(list map[string]interface{}, key string, defaultVal int) int
- func ForceString(list map[string]interface{}, key string, defaultVal string) string
- func GetMapNestedValue(json map[string]interface{}, nestedKey []string) (val interface{}, ok bool)
- func MapToSlice[key comparable, value any](input map[key]value) []value
- func MergeMaps(base, input map[string]interface{}) map[string]interface{}
- func MergeNestedMaps(base, input map[string]interface{}) map[string]interface{}
- func MergeSlices(base, input []interface{}) []interface{}
- func Retry(attempts int, sleep time.Duration, f func() error) error
- func SliceContainsElement[Element comparable](slice []Element, el Element) bool
- func SliceContainsElementFunc[Element comparable](slice []Element, comparisonFunc func(el Element) bool) bool
- func SliceFilterFunc[Element comparable](slice []Element, filterFunc func(el Element) bool) []Element
- func StructToMap(input interface{}) (result map[string]interface{}, err error)
- func ToBool(list map[string]interface{}, key string) *bool
- func ToFloat(list map[string]interface{}, key string) *float64
- func ToInt(list map[string]interface{}, key string) *int
- func ToString(list map[string]interface{}, key string) *string
- func UniqueElements(slice []interface{}) []interface{}
- type RetryStop
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateBusinessDaysBetweenDates ¶ added in v1.1.5
func ElementExists ¶
func ElementExists(slice []interface{}, el interface{}) bool
func ForceFloat ¶ added in v1.1.3
func ForceString ¶ added in v1.1.1
func GetMapNestedValue ¶ added in v1.1.0
func MapToSlice ¶ added in v1.1.6
func MapToSlice[key comparable, value any](input map[key]value) []value
MapToSlice extracts map values into a slice
func MergeNestedMaps ¶ added in v1.1.7
func MergeSlices ¶
func MergeSlices(base, input []interface{}) []interface{}
func SliceContainsElement ¶ added in v1.1.4
func SliceContainsElement[Element comparable](slice []Element, el Element) bool
SliceContainsElement returns true if the slice contains element el
func SliceContainsElementFunc ¶ added in v1.1.4
func SliceContainsElementFunc[Element comparable](slice []Element, comparisonFunc func(el Element) bool) bool
SliceContainsElementFunc returns true if the comparisonFunc for an element returns true
func SliceFilterFunc ¶ added in v1.1.4
func SliceFilterFunc[Element comparable](slice []Element, filterFunc func(el Element) bool) []Element
SliceFilterFunc returns new slice which pass the filterFunc
func StructToMap ¶
func UniqueElements ¶ added in v1.1.2
func UniqueElements(slice []interface{}) []interface{}
Types ¶
Click to show internal directories.
Click to hide internal directories.