utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayDeduplication

func ArrayDeduplication(sub []string) []string

func ArrayFilter

func ArrayFilter[T any](filterData []T, filter func(v T) bool) ([]T, []T)

func ArrayFind

func ArrayFind(s string, sub []string) (int, bool)

func ArrayFinds

func ArrayFinds[T any](maps []T, f func(m T) bool) (int, bool, T)

func ArrayStructToArrayMap

func ArrayStructToArrayMap(obj interface{}) ([]map[string]interface{}, error)

func BoolToString

func BoolToString(b bool) string

func DeepCopyMap

func DeepCopyMap[T any](obj map[string]T) map[string]T

func IsEmptyValue

func IsEmptyValue(val interface{}) bool

func MapToStruct

func MapToStruct[T any](maps ...map[string]interface{}) []T

func MapValConvert

func MapValConvert[T any](mapV1 map[string]interface{}) map[string]T

func MergeMap

func MergeMap[T any](maps ...map[string]T) map[string]T

func ParseDateTime

func ParseDateTime(timeStr *string) (time.Time, error)

ParseDateTime parse time string to time.Time (2006-01-02 15:04:05)

func SliceRemove

func SliceRemove(s string, o interface{}) interface{}

func StringToBool

func StringToBool(b string) bool

func StructToMap

func StructToMap(obj interface{}) map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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