From bd5191b20622e1d0e0bd3745e194da81f99c1815 Mon Sep 17 00:00:00 2001 From: ross Date: Fri, 22 Sep 2023 09:42:35 +0800 Subject: [PATCH] chore: golang ci lint --- pay/pay.go | 2 +- pay/redpacket/redpacket.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pay/pay.go b/pay/pay.go index e873af2..95416c2 100644 --- a/pay/pay.go +++ b/pay/pay.go @@ -39,7 +39,7 @@ func (pay *Pay) GetTransfer() *transfer.Transfer { return transfer.NewTransfer(pay.cfg) } -// NewRedpacket 红包 +// GetRedpacket 红包 func (pay *Pay) GetRedpacket() *redpacket.Redpacket { return redpacket.NewRedpacket(pay.cfg) } diff --git a/pay/redpacket/redpacket.go b/pay/redpacket/redpacket.go index 21448e8..ff1a397 100644 --- a/pay/redpacket/redpacket.go +++ b/pay/redpacket/redpacket.go @@ -31,7 +31,7 @@ type Params struct { TotalAmount int TotalNum int Wishing string - ClientIp string + ClientIP string ActName string Remark string @@ -50,7 +50,7 @@ type request struct { TotalAmount int `xml:"total_amount"` TotalNum int `xml:"total_num"` Wishing string `xml:"wishing"` - ClientIp string `xml:"client_ip"` + ClientIP string `xml:"client_ip"` ActName string `xml:"act_name"` Remark string `xml:"remark"` } @@ -63,7 +63,7 @@ type Response struct { ErrCode string `xml:"err_code,omitempty"` ErrCodeDes string `xml:"err_code_des,omitempty"` MchBillno string `xml:"mch_billno,omitempty"` - MchId string `xml:"mch_id,omitempty"` + MchID string `xml:"mch_id,omitempty"` Wxappid string `xml:"wxappid"` ReOpenID string `xml:"re_openid"` TotalAmount int `xml:"total_amount"` @@ -84,7 +84,7 @@ func (redpacket *Redpacket) SendRedpacket(p *Params) (rsp *Response, err error) param["total_amount"] = strconv.Itoa(p.TotalAmount) param["total_num"] = strconv.Itoa(p.TotalNum) param["wishing"] = p.Wishing - param["client_ip"] = p.ClientIp + param["client_ip"] = p.ClientIP param["act_name"] = p.ActName param["remark"] = p.Remark //param["scene_id"] = "PRODUCT_2" @@ -105,7 +105,7 @@ func (redpacket *Redpacket) SendRedpacket(p *Params) (rsp *Response, err error) TotalAmount: p.TotalAmount, TotalNum: p.TotalNum, Wishing: p.Wishing, - ClientIp: p.ClientIp, + ClientIP: p.ClientIP, ActName: p.ActName, Remark: p.Remark, }