1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 12:52:27 +08:00

fix golangci-lint failed (#284)

* fix golangci-lint error
This commit is contained in:
silenceper
2020-06-24 14:36:33 +08:00
committed by GitHub
parent b5c70cc206
commit 868b31cb3d
31 changed files with 175 additions and 155 deletions

View File

@@ -147,6 +147,9 @@ func (manager *Manager) Send(msg *CustomerMessage) error {
}
uri := fmt.Sprintf("%s?access_token=%s", customerSendMessage, accessToken)
response, err := util.PostJSON(uri, msg)
if err != nil {
return err
}
var result util.CommonError
err = json.Unmarshal(response, &result)
if err != nil {

View File

@@ -59,7 +59,9 @@ func (tpl *Template) Send(msg *TemplateMessage) (msgID int64, err error) {
}
uri := fmt.Sprintf("%s?access_token=%s", templateSendURL, accessToken)
response, err := util.PostJSON(uri, msg)
if err != nil {
return
}
var result resTemplateSend
err = json.Unmarshal(response, &result)
if err != nil {

View File

@@ -13,11 +13,11 @@ type TransInfo struct {
}
//NewTransferCustomer 实例化
func NewTransferCustomer(KfAccount string) *TransferCustomer {
func NewTransferCustomer(kfAccount string) *TransferCustomer {
tc := new(TransferCustomer)
if KfAccount != "" {
if kfAccount != "" {
transInfo := new(TransInfo)
transInfo.KfAccount = KfAccount
transInfo.KfAccount = kfAccount
tc.TransInfo = transInfo
}
return tc