1
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 京西速食(蔬菜)
|
||||
@@ -41,3 +42,20 @@ func TestGetSkuDetailLocalID(t *testing.T) {
|
||||
globals.SugarLogger.Debugf("data=%s", utils.Format4Output(data, false))
|
||||
globals.SugarLogger.Debugf("data=%s", err)
|
||||
}
|
||||
|
||||
func TestAaa(t *testing.T) {
|
||||
strTime := []string{"2025-05-06", "2025-05-07"}
|
||||
var err error
|
||||
timeList := make([]time.Time, len(strTime))
|
||||
for k, v := range strTime {
|
||||
if v == "" {
|
||||
timeList[k] = utils.DefaultTimeValue
|
||||
} else {
|
||||
if timeList[k], err = utils.TryStr2Time(v); err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
timeList[1].Add(24 * 60 * time.Minute)
|
||||
fmt.Println(timeList)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user