Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKindInfo ¶
func NewKindInfo(a Any) kindInfo
Types ¶
type AnyValue ¶
type AnyValue interface { // ValueOf returns a new Value initialized to the // concrete value stored in the interface i. // ValueOf(nil) returns the zero Value. ValueOf() reflect.Value // TypeOf returns the object's type. TypeOf() reflect.Type // Kind returns v's Kind. If v is the zero Value // (IsValid returns false), Kind returns Invalid. Kind() reflect.Kind // Interface returns the original underlying interface. Interface() Any // Indirect returns the value pointed to by a pointer. // If the AnyValue is not a pointer, indirect returns the // AnyValue unchanged. Indirect() AnyValue // Elem returns the value that the interface contains // or that the pointer points to. If the kind of the // AnyValue is not Interface or Ptr, the original // AnyValue is returned. Elem() reflect.Value String() string KindInfo }
AnyValue is a wrapper around the Any interface, or interface{}, which may contain any value. The extra features of this wrapper allow value, type, and kind information, as well as whether the type is comparable, ordered, and/or iterable.
func NewAnyValue ¶
NewAnyValue returns a new AnyValue interface, e.g. v := NewAnyValue(uint(42))
AnyValue is a wrapper around the Any interface, or interface{}, which may contain any value. The original interface{} value is returned by v.Interface()
The extra features of this wrapper allow value, type, and kind information, as well as whether the type is comparable, ordered, and/or iterable.
type Kind ¶
A Kind represents the specific kind of type that a Type represents. The zero Kind is not a valid kind.
Reference: standard library reflect package
type Kind uint const ( Invalid Kind = iota Bool Int Int8 Int16 Int32 Int64 Uint Uint8 Uint16 Uint32 Uint64 Uintptr Float32 Float64 Complex64 Complex128 Array Chan Func Interface Map Ptr Slice String Struct UnsafePointer )