From ff5cb4075b4d2eb07f0229ce06b8b48657e82b9e Mon Sep 17 00:00:00 2001 From: Jerry <85411418@qq.com> Date: Fri, 24 Nov 2023 11:09:29 +0800 Subject: [PATCH] update mod --- go.mod | 7 ------- go.sum | 11 ----------- xtime_test.go | 19 +++++++++---------- 3 files changed, 9 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 8cc3db3..3fb03a1 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,3 @@ module github.com/go-pay/xtime go 1.20 - -require github.com/go-pay/xlog v0.0.1 - -require ( - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect -) diff --git a/go.sum b/go.sum index eb93a62..e69de29 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +0,0 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/go-pay/xlog v0.0.1 h1:hbOHN+Rn6pH83JQzk6904fL7fsHsr9iKCZoBVX+tF9Y= -github.com/go-pay/xlog v0.0.1/go.mod h1:RgjidhvsA+4Qwpk9wN8U9zb/R3Wq+HtaAO0xUXdmSdo= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/xtime_test.go b/xtime_test.go index ec60943..4b6f636 100644 --- a/xtime_test.go +++ b/xtime_test.go @@ -2,18 +2,17 @@ package xtime import ( "encoding/json" + "log" "testing" "time" - - "github.com/go-pay/xlog" ) func TestXtime(t *testing.T) { minutes := Time(1609066441).Time().Add(time.Minute * 30).Sub(time.Now()).Minutes() - xlog.Debug(minutes) + log.Println(minutes) if minutes < 0 { // 30分钟超时 //更新订单状态为订单超时 - xlog.Debug("超时") + log.Println("超时") } } @@ -35,14 +34,14 @@ func TestParseTime(t *testing.T) { tp := new(TimeParser) err := json.Unmarshal([]byte(parseText), tp) if err != nil { - xlog.Error(err) + log.Println(err) return } - xlog.Infof("%+v", tp) + log.Printf("%+v", tp) - xlog.Debugf("t1: %s", tp.T1.UnitTime()) - xlog.Debugf("t2: %s", tp.T2.UnitTime()) - xlog.Debugf("t3: %s", tp.T3.UnitTime()) - xlog.Debugf("t4: %s", tp.T4.UnitTime()) + log.Printf("t1: %s", tp.T1.UnitTime()) + log.Printf("t2: %s", tp.T2.UnitTime()) + log.Printf("t3: %s", tp.T3.UnitTime()) + log.Printf("t4: %s", tp.T4.UnitTime()) }