增加time类型直接转换

This commit is contained in:
hoteas
2022-05-13 15:31:55 +08:00
parent 20d8926d05
commit cbcfd735ca
5 changed files with 112 additions and 0 deletions
+9
View File
@@ -5,6 +5,7 @@ import (
"errors"
"reflect"
"sort"
"time"
)
//hotime的常用map
@@ -100,6 +101,14 @@ func (that Map) GetBool(key string, err ...*Error) bool {
return v
}
func (that Map) GetTime(key string, err ...*Error) time.Time {
v := ObjToTime((that)[key], err...)
return v
}
func (that Map) RangeSort(callback func(k string, v interface{}) (isEnd bool)) {
testQu := []string{}
//testQuData:= qu[0].(Map)