This commit is contained in:
邹宗楠
2025-05-07 15:38:21 +08:00
parent 2c3b478b94
commit 7b827e79a7
3 changed files with 24 additions and 5 deletions

View File

@@ -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)
}