Versions in this module Expand all Collapse all v0 v0.9.0 Nov 14, 2018 Changes in this version + var KiT_TestFlags = Enums.AddEnumAltLower(TestFlagsN, false, nil, "Test") + var ShortTypeNames = true + var TypesMu sync.RWMutex + func AllFields(typ reflect.Type) []reflect.StructField + func AllFieldsN(typ reflect.Type) int + func AllFieldsTypeFunc(typ reflect.Type, fun func(typ reflect.Type, field reflect.StructField) bool) bool + func BitFlagsFromString(bflg *int64, str string, en interface{}) error + func BitFlagsToString(bflg int64, en interface{}) string + func BitFlagsTypeFromString(bflg *int64, str string, et reflect.Type, n int) error + func CloneToType(typ reflect.Type, val interface{}) reflect.Value + func Embed(stru interface{}, embed reflect.Type) interface + func EmbeddedTypeImplements(typ, iface reflect.Type) bool + func EnumIfaceFromInt64(ival int64, typ reflect.Type) interface + func EnumIfaceFromString(str string, typ reflect.Type) interface + func EnumIfaceToInt64(eval interface{}) int64 + func EnumIfaceToString(eval interface{}) string + func EnumInt64ToString(ival int64, typ reflect.Type) string + func EnumMarshalJSON(eval interface{}) ([]byte, error) + func EnumMarshalText(eval interface{}) ([]byte, error) + func EnumUnmarshalJSON(eval interface{}, b []byte) error + func EnumUnmarshalText(eval interface{}, b []byte) error + func FieldByPath(typ reflect.Type, path string) (reflect.StructField, bool) + func FieldValueByPath(stru interface{}, path string) (reflect.Value, bool) + func FlatFieldByName(typ reflect.Type, nm string) (reflect.StructField, bool) + func FlatFieldInterfaceByName(stru interface{}, nm string) interface + func FlatFieldInterfaces(stru interface{}) []interface + func FlatFieldTag(typ reflect.Type, nm, tag string) string + func FlatFieldVals(stru interface{}) []reflect.Value + func FlatFieldValueByName(stru interface{}, nm string) reflect.Value + func FlatFields(typ reflect.Type) []reflect.StructField + func FlatFieldsTypeFunc(typ reflect.Type, fun func(typ reflect.Type, field reflect.StructField) bool) bool + func FlatFieldsValueFunc(stru interface{}, ...) bool + func FullTypeName(typ reflect.Type) string + func GoSrcDir(dir string) (absDir string, err error) + func IfaceIsNil(it interface{}) bool + func KindIsBasic(vk reflect.Kind) bool + func MakeMap(typ reflect.Type) reflect.Value + func MakeOfType(typ reflect.Type) reflect.Value + func MakePtrValue(v reflect.Value) reflect.Value + func MakeSlice(typ reflect.Type, len, cap int) reflect.Value + func MapAdd(mv interface{}) + func MapDelete(mv interface{}, key interface{}) + func MapDeleteValue(mv interface{}, key reflect.Value) + func MapElsN(mp interface{}) int + func MapElsValueFun(mp interface{}, ...) bool + func MapKeyType(mp interface{}) reflect.Type + func MapSort(mp interface{}, byKey, ascending bool) []reflect.Value + func MapStructElsN(mp interface{}) int + func MapStructElsValueFun(mp interface{}, ...) bool + func MapValueSort(mpvnp reflect.Value, keys []reflect.Value, ascending bool) error + func MapValueType(mp interface{}) reflect.Type + func Max32(a, b float32) float32 + func Min32(a, b float32) float32 + func MinPos(a, b float64) float64 + func MinPos32(a, b float32) float32 + func NonPtrInterface(el interface{}) interface + func NonPtrType(typ reflect.Type) reflect.Type + func NonPtrValue(v reflect.Value) reflect.Value + func OnePtrInterface(el interface{}) interface + func OnePtrType(typ reflect.Type) reflect.Type + func OnePtrValue(v reflect.Value) reflect.Value + func PtrInterface(el interface{}) interface + func PtrType(typ reflect.Type) reflect.Type + func PtrValue(v reflect.Value) reflect.Value + func Sel(a ...interface{}) []interface + func SetEnumIfaceFromInt64(eval interface{}, ival int64, typ reflect.Type) error + func SetEnumIfaceFromString(eptr interface{}, str string) error + func SetEnumValueFromInt64(eval reflect.Value, ival int64) error + func SetEnumValueFromString(eval reflect.Value, str string) error + func SetRobust(to, from interface{}) bool + func SetTypeProp(props map[string]interface{}, key string, val interface{}) + func SliceDeleteAt(sl interface{}, idx int) + func SliceElType(sl interface{}) reflect.Type + func SliceNewAt(sl interface{}, idx int) + func SliceSort(sl interface{}, ascending bool) error + func String(k Type) string + func StructSliceSort(struSlice interface{}, fldIdx []int, ascending bool) error + func StructTags(tags reflect.StructTag) map[string]string + func ToBool(it interface{}) (bool, bool) + func ToFloat(it interface{}) (float64, bool) + func ToFloat32(it interface{}) (float32, bool) + func ToInt(it interface{}) (int64, bool) + func ToString(it interface{}) string + func TypeEmbeds(typ, embed reflect.Type) bool + func TypeProp(props map[string]interface{}, key string) (interface{}, bool) + func UnhideIfaceValue(v reflect.Value) reflect.Value + func ValueIsZero(v reflect.Value) bool + func ValueSliceSort(sl []reflect.Value, ascending bool) error + type EnumRegistry struct + Enums map[string]reflect.Type + Props map[string]map[string]interface{} + Vals map[string][]EnumValue + var Enums EnumRegistry + func (tr *EnumRegistry) AddEnum(en interface{}, bitFlag bool, props map[string]interface{}) reflect.Type + func (tr *EnumRegistry) AddEnumAltLower(en interface{}, bitFlag bool, props map[string]interface{}, prefix string) reflect.Type + func (tr *EnumRegistry) AllTagged(key string) []reflect.Type + func (tr *EnumRegistry) AltStrings(enumName string) map[int64]string + func (tr *EnumRegistry) BitFlagsFromStringAltFirst(bflg *int64, str string, et reflect.Type, n int) error + func (tr *EnumRegistry) Enum(name string) reflect.Type + func (tr *EnumRegistry) EnumIfaceToAltString(eval interface{}) string + func (tr *EnumRegistry) EnumInt64ToAltString(ival int64, typnm string) string + func (tr *EnumRegistry) IsBitFlag(typ reflect.Type) bool + func (tr *EnumRegistry) NVals(eval interface{}) int64 + func (tr *EnumRegistry) Prop(enumName, propKey string) interface{} + func (tr *EnumRegistry) Properties(enumName string) map[string]interface{} + func (tr *EnumRegistry) SetAnyEnumIfaceFromString(eptr interface{}, str string) error + func (tr *EnumRegistry) SetAnyEnumValueFromString(eval reflect.Value, str string) error + func (tr *EnumRegistry) SetEnumIfaceFromAltString(eptr interface{}, str string) error + func (tr *EnumRegistry) SetEnumIfaceFromStringAltFirst(eptr interface{}, str string) error + func (tr *EnumRegistry) SetEnumValueFromAltString(eval reflect.Value, str string) error + func (tr *EnumRegistry) SetEnumValueFromStringAltFirst(eval reflect.Value, str string) error + func (tr *EnumRegistry) TypeRegistered(typ reflect.Type) bool + func (tr *EnumRegistry) TypeValues(et reflect.Type, alt bool) []EnumValue + func (tr *EnumRegistry) Values(enumName string, alt bool) []EnumValue + type EnumValue struct + Name string + Type reflect.Type + Value int64 + func (ev *EnumValue) Set(name string, val int64, typ reflect.Type) + func (ev EnumValue) String() string + type TestFlags int32 + const TestFlag1 + const TestFlag2 + const TestFlagsN + const TestFlagsNil + func (ev *TestFlags) UnmarshalJSON(b []byte) error + func (ev TestFlags) MarshalJSON() ([]byte, error) + func (i *TestFlags) FromString(s string) error + func (i TestFlags) String() string + type Type struct + T reflect.Type + func (k *Type) UnmarshalJSON(b []byte) error + func (k *Type) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (k Type) FullTypeName() string + func (k Type) MarshalJSON() ([]byte, error) + func (k Type) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type TypeAndName struct + Name string + Type reflect.Type + type TypeAndNameList []TypeAndName + func (t *TypeAndNameList) Add(typ reflect.Type, nm string) + func (t *TypeAndNameList) SetFromString(str string) error + type TypeRegistry struct + Insts map[string]interface{} + Props map[string]map[string]interface{} + Types map[string]reflect.Type + var Types TypeRegistry + func (tr *TypeRegistry) AddType(obj interface{}, props map[string]interface{}) reflect.Type + func (tr *TypeRegistry) AllEmbedsOf(embed reflect.Type, inclusive, includeBases bool) []reflect.Type + func (tr *TypeRegistry) AllImplementersOf(iface reflect.Type, includeBases bool) []reflect.Type + func (tr *TypeRegistry) AllTagged(key string) []reflect.Type + func (tr *TypeRegistry) Init() + func (tr *TypeRegistry) Inst(typ reflect.Type) interface{} + func (tr *TypeRegistry) InstByName(typeName string) interface{} + func (tr *TypeRegistry) Prop(typ reflect.Type, propKey string) (interface{}, bool) + func (tr *TypeRegistry) PropByName(typeName, propKey string) (interface{}, bool) + func (tr *TypeRegistry) Properties(typ reflect.Type, makeNew bool) *map[string]interface{} + func (tr *TypeRegistry) PropsByName(typeName string, makeNew bool) *map[string]interface{} + func (tr *TypeRegistry) SetProps(typ reflect.Type, props map[string]interface{}) + func (tr *TypeRegistry) Type(typeName string) reflect.Type