@@ -22,25 +22,25 @@ import (
2222 "strings"
2323 "time"
2424
25- "github.com/xgfone/go-defaults "
25+ "github.com/xgfone/go-cast "
2626)
2727
2828// Some type converters, all of which have a default implementation,
2929// but you can reset them to yourself implementations.
3030var (
31- ToBool = defaults .ToBool // func(any) (bool, error)
32- ToInt64 = defaults .ToInt64 // func(any) (int64, error)
33- ToUint64 = defaults .ToUint64 // func(any) (uint64, error)
34- ToFloat64 = defaults .ToFloat64 // func(any) (float64, error)
35- ToString = defaults .ToString // func(any) (string, error)
36- ToDuration = defaults .ToDuration // func(any) (time.Duration, error)
37- ToTime = defaults .ToTime // func(any) (time.Time, error)
38- ToInt = toInt // func(any) (int, error)
39- ToInt16 = toInt16 // func(any) (int16, error)
40- ToInt32 = toInt32 // func(any) (int32, error)
41- ToUint = toUint // func(any) (uint, error)
42- ToUint16 = toUint16 // func(any) (uint16, error)
43- ToUint32 = toUint32 // func(any) (uint32, error)
31+ ToBool = cast .ToBool // func(any) (bool, error)
32+ ToInt64 = cast .ToInt64 // func(any) (int64, error)
33+ ToUint64 = cast .ToUint64 // func(any) (uint64, error)
34+ ToFloat64 = cast .ToFloat64 // func(any) (float64, error)
35+ ToString = cast .ToString // func(any) (string, error)
36+ ToDuration = cast .ToDuration // func(any) (time.Duration, error)
37+ ToTime = cast .ToTime // func(any) (time.Time, error)
38+ ToInt = toInt // func(any) (int, error)
39+ ToInt16 = toInt16 // func(any) (int16, error)
40+ ToInt32 = toInt32 // func(any) (int32, error)
41+ ToUint = toUint // func(any) (uint, error)
42+ ToUint16 = toUint16 // func(any) (uint16, error)
43+ ToUint32 = toUint32 // func(any) (uint32, error)
4444
4545 // For string type, it will be split by the separator " " or ",".
4646 ToIntSlice = toIntSlice // func(any) ([]int, error)
0 commit comments