Documentation ¶
Index ¶
- Constants
- Variables
- func CastInt64(v any) int64
- func SetFieldByString(dst any, field, value string) error
- func SetValueByString(field reflect.Value, value string) error
- func String(value reflect.Value) string
- func StringConvert(kind reflect.Kind, value string) (any, error)
- func StringConvertBasicFor[T any](value string) (T, error)
- func StringConvertFor[T any](value string) (T, error)
- func StringFor[T any](t T) string
- type StringConverter
- type StringConverterE
Constants ¶
View Source
const ( ArrayBool = reflect.Bool + array ArrayInt = reflect.Int + array ArrayInt8 = reflect.Int8 + array ArrayInt16 = reflect.Int16 + array ArrayInt32 = reflect.Int32 + array ArrayInt64 = reflect.Int64 + array ArrayUint = reflect.Uint + array ArrayUint8 = reflect.Uint8 + array ArrayUint16 = reflect.Uint16 + array ArrayUint32 = reflect.Uint32 + array ArrayUint64 = reflect.Uint64 + array ArrayFloat32 = reflect.Float32 + array ArrayFloat64 = reflect.Float64 + array ArrayString = reflect.String + array )
View Source
const ( SliceBool = reflect.Bool + slice SliceInt = reflect.Int + slice SliceInt8 = reflect.Int8 + slice SliceInt16 = reflect.Int16 + slice SliceInt32 = reflect.Int32 + slice SliceInt64 = reflect.Int64 + slice SliceUint = reflect.Uint + slice SliceUint8 = reflect.Uint8 + slice SliceUint16 = reflect.Uint16 + slice SliceUint32 = reflect.Uint32 + slice SliceUint64 = reflect.Uint64 + slice SliceFloat32 = reflect.Float32 + slice SliceFloat64 = reflect.Float64 + slice SliceString = reflect.String + slice )
Variables ¶
View Source
var StringConverterArrays = []StringConverterE{ reflect.Bool: stringConvertBool, reflect.Int: stringConvertInt, reflect.Int8: stringConvertInt8, reflect.Int16: stringConvertInt16, reflect.Int32: stringConvertInt32, reflect.Int64: stringConvertInt64, reflect.Uint: stringConvertUint, reflect.Uint8: stringConvertUint8, reflect.Uint16: stringConvertUint16, reflect.Uint32: stringConvertUint32, reflect.Uint64: stringConvertUint64, reflect.Float32: stringConvertFloat32, reflect.Float64: stringConvertFloat64, reflect.String: stringConvertString, }
Deprecated: unsupported slices array map
Functions ¶
func SetFieldByString ¶
func StringConvertBasicFor ¶
func StringConvertFor ¶
Types ¶
type StringConverter ¶
type StringConverterE ¶
func (StringConverterE) Converter ¶
func (c StringConverterE) Converter() StringConverter
Click to show internal directories.
Click to hide internal directories.