Documentation ¶
Index ¶
- func StringToDate(s string, timeFormat ...string) (time.Time, error)
- func ToBool(i interface{}, boolTrue ...string) bool
- func ToBoolE(i interface{}, boolTrue ...string) (value bool, err error)
- func ToBoolSlice(i interface{}, boolTrueAndSeperator ...string) []bool
- func ToBoolSliceE(i interface{}, boolTrueAndSeperator ...string) (value []bool, err error)
- func ToFloat32(i interface{}, defaultValue ...float32) float32
- func ToFloat32E(i interface{}, defaultValue ...float32) (value float32, err error)
- func ToFloat64(i interface{}, defaultValue ...float64) float64
- func ToFloat64E(i interface{}, defaultValue ...float64) (value float64, err error)
- func ToInt(i interface{}, defaultValue ...int) int
- func ToInt16(i interface{}, defaultValue ...int16) int16
- func ToInt16E(i interface{}, defaultValue ...int16) (value int16, err error)
- func ToInt32(i interface{}, defaultValue ...int32) int32
- func ToInt32E(i interface{}, defaultValue ...int32) (value int32, err error)
- func ToInt64(i interface{}, defaultValue ...int64) int64
- func ToInt64E(i interface{}, defaultValue ...int64) (value int64, err error)
- func ToInt8(i interface{}, defaultValue ...int8) int8
- func ToInt8E(i interface{}, defaultValue ...int8) (value int8, err error)
- func ToIntE(i interface{}, defaultValue ...int) (value int, err error)
- func ToIntSlice(i interface{}, seperator ...string) []int
- func ToIntSliceE(i interface{}, seperator ...string) (value []int, err error)
- func ToMap(i interface{}) map[string]interface{}
- func ToMapE(i interface{}) (value map[string]interface{}, err error)
- func ToMapSlice(i interface{}) []map[string]interface{}
- func ToMapSliceE(i interface{}) (value []map[string]interface{}, err error)
- func ToSlice(i interface{}, seperator ...string) []interface{}
- func ToSliceE(i interface{}, seperator ...string) (value []interface{}, err error)
- func ToString(i interface{}, defaultValue ...string) string
- func ToStringE(i interface{}, defaultValue ...string) (value string, err error)
- func ToStringSlice(i interface{}, seperator ...string) []string
- func ToStringSliceE(i interface{}, seperator ...string) (value []string, err error)
- func ToTime(i interface{}, timeFormat ...string) time.Time
- func ToTimeE(i interface{}, timeFormat ...string) (value time.Time, err error)
- func ToTimeSlice(i interface{}, timeFormatAndSeperator ...string) []time.Time
- func ToTimeSliceE(i interface{}, timeFormatAndSeperator ...string) (value []time.Time, err error)
- func ToTimeString(i interface{}, timeFormat ...string) string
- func ToTimeStringE(i interface{}, timeFormat ...string) (value string, err error)
- func ToUint(i interface{}, defaultValue ...uint) uint
- func ToUint16(i interface{}, defaultValue ...uint16) uint16
- func ToUint16E(i interface{}, defaultValue ...uint16) (value uint16, err error)
- func ToUint32(i interface{}, defaultValue ...uint32) uint32
- func ToUint32E(i interface{}, defaultValue ...uint32) (value uint32, err error)
- func ToUint64(i interface{}, defaultValue ...uint64) uint64
- func ToUint64E(i interface{}, defaultValue ...uint64) (value uint64, err error)
- func ToUint8(i interface{}, defaultValue ...uint8) uint8
- func ToUint8E(i interface{}, defaultValue ...uint8) (value uint8, err error)
- func ToUintE(i interface{}, defaultValue ...uint) (value uint, err error)
- func ToValueMap(i interface{}) map[string]Value
- func ToValueMapE(i interface{}) (value map[string]Value, err error)
- type Value
- func (v Value) Bool(boolTrue ...string) bool
- func (v Value) BoolSlice(boolTrueAndSeperator ...string) []bool
- func (v Value) Float32(defaultValue ...float32) float32
- func (v Value) Float64(defaultValue ...float64) float64
- func (v Value) Int(defaultValue ...int) int
- func (v Value) Int16(defaultValue ...int16) int16
- func (v Value) Int32(defaultValue ...int32) int32
- func (v Value) Int64(defaultValue ...int64) int64
- func (v Value) Int8(defaultValue ...int8) int8
- func (v Value) IntSlice(seperator ...string) []int
- func (v Value) Interface(defaultValue ...interface{}) interface{}
- func (v Value) IsEmpty() bool
- func (v Value) IsNil() bool
- func (v Value) Map() map[string]interface{}
- func (v Value) MapGet(path string) Value
- func (v Value) MapSlice() []map[string]interface{}
- func (v Value) Slice(seperator ...string) []interface{}
- func (v Value) String(defaultValue ...string) string
- func (v Value) StringSlice(seperator ...string) []string
- func (v Value) Time(timeFormat ...string) time.Time
- func (v Value) TimeSlice(timeFormatAndSeperator ...string) []time.Time
- func (v Value) TimeString(timeFormat ...string) string
- func (v Value) Uint(defaultValue ...uint) uint
- func (v Value) Uint16(defaultValue ...uint16) uint16
- func (v Value) Uint32(defaultValue ...uint32) uint32
- func (v Value) Uint64(defaultValue ...uint64) uint64
- func (v Value) Uint8(defaultValue ...uint8) uint8
- func (v Value) ValueMap() map[string]Value
- func (v Value) ValueSlice(seperator ...string) []Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToDate ¶
StringToDate attempts to parse a string into a time.Time type using a predefined list of formats. If no suitable format is found, an error is returned.
func ToBoolE ¶
ToBoolE casts an interface to a bool type.
func ToBoolSliceE ¶
ToBoolSliceE casts an interface to a []bool type. boolTrueAndSeperator 1: boolTrue, 2:seperator, empty string "" to skip parameter
func ToFloat32E ¶
ToFloat32E casts an interface to a float32 type.
func ToFloat64E ¶
ToFloat64E casts an interface to a float64 type.
func ToInt16E ¶
ToInt16E casts an interface to an int16 type.
func ToInt32E ¶
ToInt32E casts an interface to an int32 type.
func ToInt64E ¶
ToInt64E casts an interface to an int64 type.
func ToInt8E ¶
ToInt8E casts an interface to an int8 type.
func ToIntE ¶
ToIntE casts an interface to an int type.
func ToIntSliceE ¶
ToIntSliceE casts an interface to a []int type.
func ToMapE ¶
ToMapE casts an interface to a map[string]interface{} type.
func ToSliceE ¶
ToSliceE casts an interface to a []interface{} type.
func ToStringE ¶
ToStringE casts an interface to a string type.
func ToStringSliceE ¶
ToStringSliceE casts an interface to a []string type.
func ToTimeE ¶
ToTimeE casts an interface to a time.Time type.
func ToTimeSliceE ¶
ToTimeSliceE casts an interface to a []time.Time type. timeFormatAndSeperator 1: timeFormat, 2:seperator, empty string "" to skip parameter
func ToTimeString ¶
ToTimeString. timeFormat[0] : format of time string, timeFormat[1] : if interface string optionly provide specific format
func ToTimeStringE ¶
ToTimeStringE casts an interface to a time string. timeFormat[0] : format of time string, timeFormat[1] : if interface string optionly provide specific format
func ToUint16E ¶
ToUint16E casts an interface to a uint16 type.
func ToUint32E ¶
ToUint32E casts an interface to a uint32 type.
func ToUint64E ¶
ToUint64E casts an interface to a uint64 type.
func ToUint8E ¶
ToUint8E casts an interface to a uint type.
func ToUintE ¶
ToUintE casts an interface to a uint type.
Types ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value type
func ToValueSliceE ¶
ToSliceE casts an interface to a []interface{} type.
func (Value) BoolSlice ¶
BoolSlice ... boolTrueAndSeperator 1: boolTrue, 2:seperator, empty string "" to skip parameter
func (Value) Interface ¶
func (v Value) Interface(defaultValue ...interface{}) interface{}
Interface ...
func (Value) TimeSlice ¶
TimeSlice ... timeFormatAndSeperator 1: timeFormat, 2:seperator, empty string "" to skip parameter
func (Value) TimeString ¶
TimeString. timeFormat[0] : format of time string, timeFormat[1] : if interface string optionly provide specific format