util

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyArrayToStringArray

func AnyArrayToStringArray(arrInterface []interface{}) []string

func AnyToBool

func AnyToBool(v interface{}) bool

func AnyToFloat64

func AnyToFloat64(value interface{}) float64

func AnyToInt64

func AnyToInt64(value interface{}) int64

func AnyToString

func AnyToString(value interface{}) string

func FindInAnyMap

func FindInAnyMap(m AnyMap, keys ...interface{}) interface{}

func FindInAnyMapWithKeys

func FindInAnyMapWithKeys(m AnyMap, keys []interface{}) interface{}

func FindInStrMap

func FindInStrMap(m StrMap, keys ...interface{}) interface{}

func FindInStrMapWithKeys

func FindInStrMapWithKeys(m StrMap, keys []interface{}) interface{}

func FindInSyncMap

func FindInSyncMap(m *sync.Map, keys ...interface{}) interface{}

func FindInSyncMapWithKeys

func FindInSyncMapWithKeys(m *sync.Map, keys []interface{}) interface{}

func ReadBytes

func ReadBytes(fp io.Reader) ([]byte, error)

func ReadFileFromPath

func ReadFileFromPath(path string) ([]byte, error)

func StringToInt64

func StringToInt64(value string) (int64, error)

Types

type AnyMap

type AnyMap = map[interface{}]interface{}

func AnyToAnyMap

func AnyToAnyMap(value interface{}) AnyMap

type Error

type Error interface {
	error
	Unwrap() error
}

Error may wrap another error

func NewError

func NewError(message string, wrap error) Error

type StrMap

type StrMap = map[string]interface{}

func AnyArrayToStrMap

func AnyArrayToStrMap(mapInterface []interface{}) StrMap

func AnyToStrMap

func AnyToStrMap(value interface{}) StrMap

Jump to

Keyboard shortcuts

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