dynamic

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: BSD-3-Clause Imports: 4 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValue

func AddValue(object interface{}, value interface{})

func BooleanValue

func BooleanValue(value interface{}, defaultValue bool) bool

func Each

func Each(object interface{}, fn func(key interface{}, value interface{}) bool)

func EachReflect

func EachReflect(v reflect.Value, fn func(name string, value reflect.Value) bool)

func EachReflectWithTag added in v1.0.12

func EachReflectWithTag(v reflect.Value, fn func(name string, value reflect.Value) bool, getTag func(fd reflect.StructField) string)

func FloatValue

func FloatValue(value interface{}, defaultValue float64) float64

func Get

func Get(object interface{}, key string) interface{}

func GetWithAutoCreate

func GetWithAutoCreate(object interface{}, key string, autocreate bool) interface{}

func GetWithKeys

func GetWithKeys(object interface{}, keys []string) interface{}

func IntValue

func IntValue(value interface{}, defaultValue int64) int64

func IsEmpty

func IsEmpty(object interface{}) bool

func IsNil

func IsNil(object interface{}) bool

func Set

func Set(object interface{}, key string, value interface{})

func SetReflectValue

func SetReflectValue(v reflect.Value, value interface{})

func SetValue

func SetValue(object interface{}, value interface{})

func SetWithKeys

func SetWithKeys(object interface{}, keys []string, value interface{})

func StringValue

func StringValue(value interface{}, defaultValue string) string

func UintValue

func UintValue(value interface{}, defaultValue uint64) uint64

Types

type IGetter

type IGetter interface {
	GetValue(key string) interface{}
}

type ISetter

type ISetter interface {
	SetValue(key string, value interface{})
}

type IString

type IString interface {
	String() string
}

Jump to

Keyboard shortcuts

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