Version: v0.0.0-...-ee0865d Latest Latest

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

Go to latest
Published: Jan 25, 2021 License: MIT, MIT Imports: 3 Imported by: 0




This section is empty.


View Source
var NewMap = map[string]func(args ...interface{}) interface{}{}


func Array

func Array(t map[string]interface{}, key string) (r []interface{})

获取map的array, 如果不存在就创建一个

func ArrayByMap

func ArrayByMap(val interface{}, handler func(length int, keys []int, items []interface{})) (r []interface{})

func Bool

func Bool(t map[string]interface{}, key string) (r bool)

func BoolDefault

func BoolDefault(t map[string]interface{}, key string, dflt bool) (r bool)

func CloneAny

func CloneAny(a interface{}) (r interface{})

func CloneArray

func CloneArray(a []interface{}) (r []interface{})

func CloneMap

func CloneMap(a map[string]interface{}) (r map[string]interface{})

func CopyMap

func CopyMap(from, to map[string]interface{})

func CreateConfigMap2

func CreateConfigMap2(keys []string, r map[string]interface{}, val interface{})

func CreateConfigMap3

func CreateConfigMap3(keys string, r map[string]interface{}, val interface{})

func Float64

func Float64(t map[string]interface{}, key string) (r float64)

func Float64Default

func Float64Default(t map[string]interface{}, key string, dflt float64) (r float64)

func Has

func Has(t map[string]interface{}, key string) bool

func HasKeys

func HasKeys(t map[string]interface{}, keys ...string) bool

func Int

func Int(t map[string]interface{}, key string) (r int)

func IntDefault

func IntDefault(t map[string]interface{}, key string, dflt int) (r int)

func Interface

func Interface(t map[string]interface{}, key string) (r interface{})

func Keys

func Keys(t map[string]interface{}) (r []string)

func Map

func Map(t map[string]interface{}, key string) (r map[string]interface{})

func Set

func Set(t map[string]interface{}, key string, val interface{})

func String

func String(t map[string]interface{}, key string) (r string)

func StringDefault

func StringDefault(t map[string]interface{}, key string, dflt string) (r string)

func StructFromByInterface

func StructFromByInterface(target, val interface{}, args ...interface{}) (r interface{})

func StructFromByType

func StructFromByType(val interface{}, args ...interface{}) (r interface{})

func StructToByType

func StructToByType(val interface{}, args ...interface{}) (r interface{})

func StructToValue

func StructToValue(st IToMap, val interface{}, name string, args ...interface{})

func StructToValueNotNull

func StructToValueNotNull(st IToMap, args ...interface{}) (r interface{})

func ToMapAllStruct

func ToMapAllStruct(st IToMapAll, val interface{}, args ...interface{})

func ToMapInterface

func ToMapInterface(st interface{}, val interface{}, args ...interface{}) (r interface{})

func ToMapStruct

func ToMapStruct(st IToMap, val interface{}, args ...interface{})

func ToMapStructByType

func ToMapStructByType(val interface{}, args ...interface{}) (r interface{})


type IFromMap

type IFromMap interface {
	FromMap(m map[string]interface{}, args ...interface{})

func StructFromValue

func StructFromValue(st IFromMap, val interface{}, args ...interface{}) IFromMap

type IStructName

type IStructName interface {
	StructName() string

type IToMap

type IToMap interface {
	ToMap(m map[string]interface{}, args ...interface{})

type IToMapAll

type IToMapAll interface {
	ToMapAll(m map[string]interface{}, args ...interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL