Documentation ¶
Index ¶
- func BASE64(str string) string
- func ContainsInt(array []int, val int) int
- func ContainsString(array []string, val string) int
- func CopyBeanUseJson(src interface{}, dest interface{}) error
- func CurrentMilliSeconds() int64
- func DefaultBool(v interface{}) (bool, bool)
- func DefaultString(v interface{}) (string, bool)
- func EqualsIgnoreCase(a, b string) booldeprecated
- func ErrorToString(err error) string
- func ErrorWithFileLine(err error) error
- func FileLine(fn interface{}) (file string, line int, fnName string)
- func FindInList(v interface{}, l *list.List) (*list.Element, bool)
- func Indirect(t reflect.Type) reflect.Type
- func IsNil(v reflect.Value) bool
- func LocalIPv4() string
- func MD5(str string) string
- func MilliSeconds(d time.Duration) int64
- func NewList(v ...interface{}) *list.List
- func SafeCloseChan(ch chan struct{})
- func ToInt16SliceE(i interface{}) ([]int16, error)
- func ToInt32SliceE(i interface{}) ([]int32, error)
- func ToInt64SliceE(i interface{}) ([]int64, error)
- func ToInt8SliceE(i interface{}) ([]int8, error)
- func ToIntSliceE(i interface{}) ([]int, error)
- func ToJson(i interface{}) string
- func ToUint16SliceE(i interface{}) ([]uint16, error)
- func ToUint32SliceE(i interface{}) ([]uint32, error)
- func ToUint64SliceE(i interface{}) ([]uint64, error)
- func ToUint8SliceE(i interface{}) ([]uint8, error)
- func ToUintSliceE(i interface{}) ([]uint, error)
- func ValuePatch(v reflect.Value) reflect.Value
- func ValuePatchIf(v reflect.Value, allAccess bool) reflect.Value
- type PanicCond
- type WaitGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsInt ¶ added in v1.0.4
ContainsInt 在一个 int 数组中进行查找,找不到返回 -1。
func ContainsString ¶ added in v1.0.4
ContainsString 在一个 string 数组中进行查找,找不到返回 -1。
func CopyBeanUseJson ¶
func CopyBeanUseJson(src interface{}, dest interface{}) error
CopyBeanUseJson 使用 json 序列化框架进行拷贝,支持匿名字段,支持类型转换。
func CurrentMilliSeconds ¶ added in v1.0.4
func CurrentMilliSeconds() int64
CurrentMilliSeconds 返回当前的毫秒时间戳
func DefaultBool ¶ added in v1.0.3
DefaultBool 将 nil 转换成 false 布尔值
func DefaultString ¶ added in v1.0.3
DefaultString 将 nil 转换成空字符串
func EqualsIgnoreCase
deprecated
added in
v1.0.4
func ErrorToString ¶ added in v1.0.4
ErrorToString 获取 error 的字符串
func ErrorWithFileLine ¶ added in v1.0.4
ErrorWithFileLine 返回错误发生的文件行号
func FindInList ¶ added in v1.0.4
FindInList 查询列表中是否存在指定元素,存在则返回列表项指针
func MilliSeconds ¶ added in v1.0.4
MilliSeconds 返回 Duration 对应的毫秒时间
func ToInt16SliceE ¶ added in v1.0.4
ToInt16SliceE casts an interface to a []int16 type.
func ToInt32SliceE ¶ added in v1.0.4
ToInt32SliceE casts an interface to a []int32 type.
func ToInt64SliceE ¶ added in v1.0.4
ToInt64SliceE casts an interface to a []int64 type.
func ToInt8SliceE ¶ added in v1.0.4
ToInt8SliceE casts an interface to a []int8 type.
func ToIntSliceE ¶ added in v1.0.4
ToIntSliceE casts an interface to a []int type.
func ToUint16SliceE ¶ added in v1.0.4
ToUint16SliceE casts an interface to a []uint16 type.
func ToUint32SliceE ¶ added in v1.0.4
ToUint32SliceE casts an interface to a []uint32 type.
func ToUint64SliceE ¶ added in v1.0.4
ToUint64SliceE casts an interface to a []uint64 type.
func ToUint8SliceE ¶ added in v1.0.4
ToUint8SliceE casts an interface to a []uint8 type.
func ToUintSliceE ¶ added in v1.0.4
ToUintSliceE casts an interface to a []uint type.
func ValuePatch ¶
ValuePatch 开放 Value 的私有字段,但是不会更新外部传入的 Value。
Types ¶
type PanicCond ¶
type PanicCond struct {
// contains filtered or unexported fields
}
PanicCond 封装触发 panic 的条件
Source Files ¶
- spring-utils-bean.go
- spring-utils-bool.go
- spring-utils-cast.go
- spring-utils-chan.go
- spring-utils-contains.go
- spring-utils-encoding.go
- spring-utils-error.go
- spring-utils-json.go
- spring-utils-list.go
- spring-utils-net.go
- spring-utils-reflect.go
- spring-utils-string.go
- spring-utils-sync.go
- spring-utils-time.go