From f415a8ef19b52e86910bbd50c6119c1c684a1115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=89=E6=98=A5?= Date: Thu, 18 May 2023 11:12:36 +0800 Subject: [PATCH] - update --- go.mod | 2 +- go.sum | 4 ++-- library.go | 2 +- service/wnfuwu/check.go | 5 +++++ service/wnfuwu/recharge.go | 5 +++++ vendor/github.com/sirupsen/logrus/README.md | 8 +++++--- vendor/modules.txt | 2 +- 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 850537ae..ba5b2da4 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/saracen/go7z v0.0.0-20191010121135-9c09b6bd7fda github.com/shirou/gopsutil v3.21.11+incompatible - github.com/sirupsen/logrus v1.9.0 + github.com/sirupsen/logrus v1.9.2 github.com/tencentyun/cos-go-sdk-v5 v0.7.41 go.mongodb.org/mongo-driver v1.11.6 go.uber.org/zap v1.24.0 diff --git a/go.sum b/go.sum index 442bd045..d9517663 100644 --- a/go.sum +++ b/go.sum @@ -486,8 +486,8 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= +github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= diff --git a/library.go b/library.go index 3abbd84d..e564c7eb 100644 --- a/library.go +++ b/library.go @@ -1,5 +1,5 @@ package go_library func Version() string { - return "1.0.146" + return "1.0.147" } diff --git a/service/wnfuwu/check.go b/service/wnfuwu/check.go index cbd770ab..6f495407 100644 --- a/service/wnfuwu/check.go +++ b/service/wnfuwu/check.go @@ -9,6 +9,11 @@ import ( type CheckResponse struct { Errno int64 `json:"errno"` // 错误码,0代表成功,非0代表失败 Errmsg string `json:"errmsg"` // 错误描述 +} + +type CheckResponseContent struct { + Errno int64 `json:"errno"` // 错误码,0代表成功,非0代表失败 + Errmsg string `json:"errmsg"` // 错误描述 Data []struct { Id int64 `json:"id,omitempty"` // 编号 OrderNumber string `json:"order_number"` // 系统定单号 diff --git a/service/wnfuwu/recharge.go b/service/wnfuwu/recharge.go index 997e4b48..9c19a6b9 100644 --- a/service/wnfuwu/recharge.go +++ b/service/wnfuwu/recharge.go @@ -9,6 +9,11 @@ import ( type RechargeResponse struct { Errno int64 `json:"errno"` // 错误码,0代表成功,非0代表失败 Errmsg string `json:"errmsg"` // 错误描述 +} + +type RechargeResponseContent struct { + Errno int64 `json:"errno"` // 错误码,0代表成功,非0代表失败 + Errmsg string `json:"errmsg"` // 错误描述 Data struct { CreateTime int64 `json:"create_time,omitempty"` // 下单时间 Guishu string `json:"guishu,omitempty"` // 归属地 diff --git a/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md index b042c896..d1d4a85f 100644 --- a/vendor/github.com/sirupsen/logrus/README.md +++ b/vendor/github.com/sirupsen/logrus/README.md @@ -9,7 +9,7 @@ the last thing you want from your Logging library (again...). This does not mean Logrus is dead. Logrus will continue to be maintained for security, (backwards compatible) bug fixes, and performance (where we are -limited by the interface). +limited by the interface). I believe Logrus' biggest contribution is to have played a part in today's widespread use of structured logging in Golang. There doesn't seem to be a @@ -43,7 +43,7 @@ plain text): With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash or Splunk: -```json +```text {"animal":"walrus","level":"info","msg":"A group of walrus emerges from the ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"} @@ -99,7 +99,7 @@ time="2015-03-26T01:27:38-04:00" level=fatal method=github.com/sirupsen/arcticcr ``` Note that this does add measurable overhead - the cost will depend on the version of Go, but is between 20 and 40% in recent tests with 1.6 and 1.7. You can validate this in your -environment via benchmarks: +environment via benchmarks: ``` go test -bench=.*CallerTracing ``` @@ -317,6 +317,8 @@ log.SetLevel(log.InfoLevel) It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose environment if your application has that. +Note: If you want different log levels for global (`log.SetLevel(...)`) and syslog logging, please check the [syslog hook README](hooks/syslog/README.md#different-log-levels-for-local-and-remote-logging). + #### Entries Besides the fields added with `WithField` or `WithFields` some fields are diff --git a/vendor/modules.txt b/vendor/modules.txt index ff8b7e40..56b010c4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -309,7 +309,7 @@ github.com/shirou/gopsutil/internal/common github.com/shirou/gopsutil/mem github.com/shirou/gopsutil/net github.com/shirou/gopsutil/process -# github.com/sirupsen/logrus v1.9.0 +# github.com/sirupsen/logrus v1.9.2 ## explicit; go 1.13 github.com/sirupsen/logrus # github.com/syndtr/goleveldb v1.0.0