Documentation ¶
Index ¶
- func Bool(val interface{}) (bool, error)
- func Bytes(val interface{}) ([]byte, error)
- func ContainsKey(val interface{}, subitem interface{}) (bool, error)
- func ContainsValue(val interface{}, subitem interface{}) (bool, error)
- func Float32(val interface{}) (float32, error)
- func Float64(val interface{}) (float64, error)
- func Implode(listValue interface{}, glue string) (string, error)
- func Int(val interface{}) (int, error)
- func Int32(val interface{}) (int32, error)
- func Int64(val interface{}) (int64, error)
- func Int8(val interface{}) (int8, error)
- func MustBool(val interface{}, def bool) bool
- func MustBytes(val interface{}, def []byte) []byte
- func MustContainsKey(val interface{}, subitem interface{}, def bool) bool
- func MustContainsValue(val interface{}, subitem interface{}, def bool) bool
- func MustFloat32(val interface{}, def float32) float32
- func MustFloat64(val interface{}, def float64) float64
- func MustInt(val interface{}, def int) int
- func MustInt32(val interface{}, def int32) int32
- func MustInt64(val interface{}, def int64) int64
- func MustInt8(val interface{}, def int8) int8
- func MustSlice(val interface{}, def interface{}) interface{}
- func MustString(val interface{}, def string) string
- func MustUint(val interface{}, def uint) uint
- func MustUint32(val interface{}, def uint32) uint32
- func MustUint64(val interface{}, def uint64) uint64
- func MustUint8(val interface{}, def uint8) uint8
- func Slice(val interface{}) ([]interface{}, error)
- func String(val interface{}) (string, error)
- func Substring(source string, start int, end int) string
- func Uint(val interface{}) (uint, error)
- func Uint32(val interface{}) (uint32, error)
- func Uint64(val interface{}) (uint64, error)
- func Uint8(val interface{}) (uint8, error)
- type GoMResult
- func (gmr *GoMResult) Bool(def bool) bool
- func (gmr *GoMResult) Bytes(defautValue []byte) []byte
- func (gmr *GoMResult) Float32(defautValue float32) float32
- func (gmr *GoMResult) Float64(defautValue float64) float64
- func (gmr *GoMResult) Int(def int) int
- func (gmr *GoMResult) Int64(defautValue int64) int64
- func (gmr *GoMResult) Int8(def int8) int8
- func (gmr *GoMResult) Interface() interface{}
- func (gmr *GoMResult) String(def string) string
- func (gmr *GoMResult) Uint32(defautValue uint32) uint32
- func (gmr *GoMResult) Uint64(defautValue uint64) uint64
- func (gmr *GoMResult) Uint8(defautValue uint8) uint8
- type GoMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
convert any value to bool Bool 将 val 转换成 bool 类型或是在无法转换的情况下返回 error。
123(true), 0(false),"-123"(true), "on"(true), "off"(false), "true"(true), "false"(false)
func ContainsKey ¶
check if a key exists in array/slice/map does not support sub array 在array/slice/map中寻找键 不支持子数组
func ContainsValue ¶
check if a value exists in array/slice/map does not support sub array 在array/slice/map中寻找值 不支持子数组
func MustContainsKey ¶
check if a key exists in array/slice/map, return def value in case error
func MustContainsValue ¶
check if a value exists in array/slice/map, return def value in case error
func MustFloat32 ¶
func MustFloat64 ¶
func MustString ¶
convert any value to string or return del value in case of error
func MustUint32 ¶
func MustUint64 ¶
Types ¶
type GoMResult ¶
type GoMResult struct {
// contains filtered or unexported fields
}
func (*GoMResult) Interface ¶
func (gmr *GoMResult) Interface() interface{}
get GoMResult as interface{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.