utils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlterDynamicProperty

func AlterDynamicProperty(prevDynamicValue []byte, dynamicProperty interface{}) map[string]interface{}

func AnyToString

func AnyToString(i any) string

func CamelCase

func CamelCase(u interface{}) (interface{}, error)

CamelCase converts the supplied data into a map[string]interface{} representation then recursively renames any keys that start with an uppercase letter to the same name with a lowercase first letter.

func ConvertInt64ToStr

func ConvertInt64ToStr(intValue int64) string

func ConvertInterfaceToMapOfStringKey

func ConvertInterfaceToMapOfStringKey(i interface{}) map[string]interface{}

func ConvertStrToInt64

func ConvertStrToInt64(str string) int64

func GetType

func GetType(i interface{}) string

func InterfaceToString

func InterfaceToString(i interface{}) string

func IsNullOrEmpty

func IsNullOrEmpty(i interface{}) bool

func SafeGet

func SafeGet(jsonString string, selector string) interface{}

func SafeGetFromInterface

func SafeGetFromInterface(i interface{}, selector string) interface{}

func SafeGetFromInterfaceErrorCaught

func SafeGetFromInterfaceErrorCaught(i interface{}, selector string) (interface{}, error)

func SafeGetFromInterfaceGeneric

func SafeGetFromInterfaceGeneric[t any](i interface{}, selector string) any

func SafeGetFromInterfaceGenericAndDeserialize

func SafeGetFromInterfaceGenericAndDeserialize[T any](i interface{}, selector string) T

func SafeGetMarshalled

func SafeGetMarshalled(jsonString string, selector string) []byte

func SafeGetToString

func SafeGetToString(jsonString string, selector string) string

func ToCamelCaseLower

func ToCamelCaseLower(s string) string

func ToSnakeCase

func ToSnakeCase(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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