Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iGoogle-ink committed May 25, 2023
1 parent d2a67f4 commit 7c387e4
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion open/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type SDK struct {
Host string
autoManageToken bool // 是否自动维护刷新 AccessToken
autoRefreshTokenInternal time.Duration // 自动刷新 token 的间隔时间
minRefreshTokenDuration time.Duration // 最小刷新 token 的阈值时长
openidAccessTokenMap map[string]*AccessToken // key: openid

callback func(at *AT, err error)
Expand Down
1 change: 0 additions & 1 deletion open/open_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
var (
ctx = context.Background()
openSDK *SDK
err error
// 测试时,将自己的Appid和Secret填入,此appid和secret为测试号
Appid = "wxcfad67697020fc14"
Secret = "c104683b3067ceac97b680aa5bf62b69"
Expand Down
2 changes: 1 addition & 1 deletion pkg/bmap/body_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (bm BodyMap) MarshalXML(e *xml.Encoder, start xml.StartElement) (err error)
}
for k := range bm {
if v := bm.GetString(k); v != "" {
e.Encode(xmlMapMarshal{XMLName: xml.Name{Local: k}, Value: v})
_ = e.Encode(xmlMapMarshal{XMLName: xml.Name{Local: k}, Value: v})
}
}
return e.EncodeToken(start.End())
Expand Down
10 changes: 0 additions & 10 deletions pkg/xtime/xtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@ package xtime
import (
"encoding/json"
"testing"
"time"

"github.com/go-pay/wechat-sdk/pkg/xlog"
)

func TestXtime(t *testing.T) {
minutes := Time(1609066441).Time().Add(time.Minute * 30).Sub(time.Now()).Minutes()
xlog.Debug(minutes)
if minutes < 0 { // 30分钟超时
//更新订单状态为订单超时
xlog.Debug("超时")
}
}

type TimeParser struct {
T1 Duration `json:"t1"`
T2 Duration `json:"t2"`
Expand Down

0 comments on commit 7c387e4

Please sign in to comment.