Merge branch 'master' of e.coding.net:rosydev/baseapi

This commit is contained in:
邹宗楠
2022-11-22 16:17:21 +08:00
4 changed files with 23 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

View File

@@ -445,3 +445,21 @@ func BatchStr2Time(strTime ...string) (timeList []time.Time, err error) {
func TestPrint(t *testing.T) {
globals.SugarLogger.Debugf("%d", []int{1, 2, 3, 46, 65})
}
//func TestToMap(t *testing.T) {
// data:=" "57939570":[{"123":"987"},{"124":"988"},{"125":"989"},{"126":"990"},{"127":"991"}] "
// result, err := utils.Unmarshal2Map([]byte(data), &payload)
//
//}
//
//func toMap(actual interface{}) ([]string, error) {
// var res []string
// value := reflect.ValueOf(actual)
// if value.Kind() != reflect.Slice && value.Kind() != reflect.Array {
// return nil, errors.New("parse error")
// }
// for i := 0; i < value.Len(); i++ {
// res = append(res, value.Index(i).Interface().(string))
// }
// return res, nil
//}