Preparing report...

Report for github.com/cnfinder/wechat

A    Great!    Found 23 issues across 71 files

Tweet

gofmt71%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo98%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint84%

Golint is a linter for Go source code.

    • wechat/material/media.go
    • Line 71: warning: comment on exported method Material.MediaUploadData should be of the form "MediaUploadData ..." (golint)
    • Line 111: warning: comment on exported method Material.MediaUploadForMultipart should be of the form "MediaUploadForMultipart ..." (golint)
    • wechat/miniprogram/miniprogram.go
    • Line 21: warning: comment on exported method MiniProgram.GetLiveRoom should be of the form "GetLiveRoom ..." (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 27: warning: comment on exported method MiniProgram.GetLiveGoodsMgr should be of the form "GetLiveGoodsMgr ..." (golint)
    • Line 28: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: comment on exported method MiniProgram.GetLiveAnchor should be of the form "GetLiveAnchor ..." (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 38: warning: comment on exported method MiniProgram.GetSubscribe should be of the form "GetSubscribe ..." (golint)
    • Line 39: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • wechat/miniprogram/subscribe.go
    • Line 23: warning: exported function NewSubscribe should have comment or be unexported (golint)
    • Line 46: warning: comment on exported type ResSubMessage should be of the form "ResSubMessage ..." (with optional leading article) (golint)
    • wechat/pay/query_order.go
    • Line 12: warning: comment on exported type QueryOrderRequest should be of the form "QueryOrderRequest ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported type QueryOrderResponse should be of the form "QueryOrderResponse ..." (with optional leading article) (golint)
    • Line 68: warning: exported method Pay.Queryorder should have comment or be unexported (golint)
    • Line 131: warning: don't use underscores in Go names; const Trade_state_success should be TradeStateSuccess (golint)
    • Line 131: warning: exported const Trade_state_success should have comment (or a comment on this block) or be unexported (golint)
    • Line 132: warning: don't use underscores in Go names; const Trade_state_refund should be TradeStateRefund (golint)
    • Line 133: warning: don't use underscores in Go names; const Trade_state_noypay should be TradeStateNoypay (golint)
    • Line 134: warning: don't use underscores in Go names; const Trade_state_closed should be TradeStateClosed (golint)
    • Line 135: warning: don't use underscores in Go names; const Trade_state_revoked should be TradeStateRevoked (golint)
    • Line 136: warning: don't use underscores in Go names; const Trade_state_userpaying should be TradeStateUserpaying (golint)
    • Line 137: warning: don't use underscores in Go names; const Trade_state_payerror should be TradeStatePayerror (golint)
    • wechat/pay/withdrawal_bank.go
    • Line 13: warning: don't use underscores in Go names; var WithdrawalGateway_bank should be WithdrawalGatewayBank (golint)
    • Line 13: warning: exported var WithdrawalGateway_bank should have comment or be unexported (golint)
    • Line 16: warning: comment on exported type WithdrawalRequest_bank should be of the form "WithdrawalRequest_bank ..." (with optional leading article) (golint)
    • Line 22: warning: don't use underscores in Go names; type WithdrawalRequest_bank should be WithdrawalRequestBank (golint)
    • Line 24: warning: don't use underscores in Go names; struct field Nonce_str should be NonceStr (golint)
    • Line 25: warning: don't use underscores in Go names; struct field Enc_bank_no should be EncBankNo (golint)
    • Line 26: warning: don't use underscores in Go names; struct field Enc_true_name should be EncTrueName (golint)
    • Line 27: warning: don't use underscores in Go names; struct field Bank_code should be BankCode (golint)
    • Line 34: warning: comment on exported type WithdrawalResponse_bank should be of the form "WithdrawalResponse_bank ..." (with optional leading article) (golint)
    • Line 35: warning: don't use underscores in Go names; type WithdrawalResponse_bank should be WithdrawalResponseBank (golint)
    • Line 41: warning: don't use underscores in Go names; struct field Mch_id should be MchID (golint)
    • Line 42: warning: don't use underscores in Go names; struct field Partner_trade_no should be PartnerTradeNo (golint)
    • Line 46: warning: don't use underscores in Go names; struct field Payment_no should be PaymentNo (golint)
    • Line 47: warning: don't use underscores in Go names; struct field Cmms_amt should be CmmsAmt (golint)
    • Line 52: warning: exported method Pay.WithDrawal_bank should have comment or be unexported (golint)
    • Line 52: warning: don't use underscores in Go names; method WithDrawal_bank should be WithDrawalBank (golint)
    • wechat/miniprogram/live/live_anchor.go
    • Line 16: warning: exported var ROLE_ERR_MSG should have comment or be unexported (golint)
    • Line 24: warning: comment on exported type LiveAnchor should be of the form "LiveAnchor ..." (with optional leading article) (golint)
    • Line 30: warning: exported function NewLiveAnchor should have comment or be unexported (golint)
    • Line 56: warning: exported type RoleReq should have comment or be unexported (golint)
    • Line 72: warning: exported type RoleListReq should have comment or be unexported (golint)
    • Line 79: warning: exported type RoleRes should have comment or be unexported (golint)
    • Line 94: warning: exported type RoleList should have comment or be unexported (golint)
    • Line 118: warning: exported type RoleListRes should have comment or be unexported (golint)
    • Line 138: warning: exported method LiveAnchor.AddRole should have comment or be unexported (golint)
    • Line 138: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 173: warning: exported method LiveAnchor.DelRole should have comment or be unexported (golint)
    • Line 173: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 208: warning: exported method LiveAnchor.QueryRoleList should have comment or be unexported (golint)
    • Line 208: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • wechat/miniprogram/live/live_goodsmgr.go
    • Line 22: warning: comment on exported type LiveGoodsMgr should be of the form "LiveGoodsMgr ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported function NewLiveGoodsMgr should be of the form "NewLiveGoodsMgr ..." (golint)
    • Line 37: warning: exported type GoodsInfoRequest should have comment or be unexported (golint)
    • Line 41: warning: exported type GoodsInfoRes should have comment or be unexported (golint)
    • Line 50: warning: exported type GoodsInfo should have comment or be unexported (golint)
    • Line 69: warning: comment on exported method LiveGoodsMgr.GoodsAdd should be of the form "GoodsAdd ..." (golint)
    • Line 71: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 111: warning: comment on exported method LiveGoodsMgr.GoodsResetaudit should be of the form "GoodsResetaudit ..." (golint)
    • Line 113: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 149: warning: exported type GoodsAuditRes should have comment or be unexported (golint)
    • Line 161: warning: comment on exported method LiveGoodsMgr.GoodsAudit should be of the form "GoodsAudit ..." (golint)
    • Line 163: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 196: warning: comment on exported method LiveGoodsMgr.GoodsDelete should be of the form "GoodsDelete ..." (golint)
    • Line 198: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 242: warning: comment on exported method LiveGoodsMgr.GoodsUpdate should be of the form "GoodsUpdate ..." (golint)
    • Line 243: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 272: warning: exported type GoodswarehouseRes should have comment or be unexported (golint)
    • Line 283: warning: exported type GoodsWare should have comment or be unexported (golint)
    • Line 294: warning: don't use underscores in Go names; struct field Third_party_tag should be ThirdPartyTag (golint)
    • Line 304: warning: comment on exported method LiveGoodsMgr.GetGoodswarehouse should be of the form "GetGoodswarehouse ..." (golint)
    • Line 305: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 305: warning: don't use underscores in Go names; method parameter goods_ids should be goodsIds (golint)
    • Line 341: warning: exported type GoodsListRes should have comment or be unexported (golint)
    • Line 352: warning: exported type GoodsWare2 should have comment or be unexported (golint)
    • Line 363: warning: don't use underscores in Go names; struct field Third_party_tag should be ThirdPartyTag (golint)
    • Line 373: warning: comment on exported method LiveGoodsMgr.Getapproved should be of the form "Getapproved ..." (golint)
    • Line 374: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • wechat/miniprogram/live/live_room.go
    • Line 19: warning: comment on exported type LiveRoom should be of the form "LiveRoom ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported function NewLiveRoom should be of the form "NewLiveRoom ..." (golint)
    • Line 33: warning: exported type Room should have comment or be unexported (golint)
    • Line 54: warning: exported type RoomRes should have comment or be unexported (golint)
    • Line 59: warning: don't use underscores in Go names; struct field Qrcode_url should be QrcodeURL (golint)
    • Line 71: warning: comment on exported method LiveRoom.CreateLiveRoom should be of the form "CreateLiveRoom ..." (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 106: warning: exported type RoomInfoRes should have comment or be unexported (golint)
    • Line 113: warning: exported type RoomInfo should have comment or be unexported (golint)
    • Line 124: warning: don't use underscores in Go names; struct field Live_status should be LiveStatus (golint)
    • Line 127: warning: exported type Goods should have comment or be unexported (golint)
    • Line 145: warning: comment on exported method LiveRoom.GetLiveinfoList should be of the form "GetLiveinfoList ..." (golint)
    • Line 147: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 187: warning: exported type RoomReplayRes should have comment or be unexported (golint)
    • Line 195: warning: exported type LiveReplay should have comment or be unexported (golint)
    • Line 214: warning: exported method LiveRoom.GetLiveinfoReplayList should have comment or be unexported (golint)
    • Line 214: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 214: warning: don't use underscores in Go names; method parameter room_id should be roomID (golint)
    • Line 254: warning: exported type AddGoodsRes should have comment or be unexported (golint)
    • Line 272: warning: exported method LiveRoom.AddGoods should have comment or be unexported (golint)
    • Line 272: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 272: warning: don't use underscores in Go names; method parameter room_id should be roomID (golint)
    • Line 306: warning: exported type DelLiveRoomRes should have comment or be unexported (golint)
    • Line 310: warning: exported method LiveRoom.DelLiveRoom should have comment or be unexported (golint)
    • Line 310: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • wechat/message/miniprogrampage.go
    • Line 4: warning: comment on exported type Miniprogrampage should be of the form "Miniprogrampage ..." (with optional leading article) (golint)
    • Line 8: warning: don't use underscores in Go names; struct field Miniprogrampage_content should be MiniprogrampageContent (golint)
    • Line 12: warning: don't use underscores in Go names; struct field Thumb_media_id should be ThumbMediaID (golint)
    • Line 17: warning: exported function NewMiniprogrampage should have comment or be unexported (golint)
    • Line 17: warning: don't use underscores in Go names; func parameter thumb_media_id should be thumbMediaID (golint)
    • wechat/pay/withdrawal_wxbalance.go
    • Line 11: warning: don't use underscores in Go names; var WithdrawalGateway_wxbalance should be WithdrawalGatewayWxbalance (golint)
    • Line 11: warning: exported var WithdrawalGateway_wxbalance should have comment or be unexported (golint)
    • Line 14: warning: comment on exported type WithdrawalRequest_wxbalance should be of the form "WithdrawalRequest_wxbalance ..." (with optional leading article) (golint)
    • Line 15: warning: don't use underscores in Go names; type WithdrawalRequest_wxbalance should be WithdrawalRequestWxbalance (golint)
    • Line 16: warning: don't use underscores in Go names; struct field Mch_appid should be MchAppid (golint)
    • Line 18: warning: don't use underscores in Go names; struct field Device_info should be DeviceInfo (golint)
    • Line 19: warning: don't use underscores in Go names; struct field Nonce_str should be NonceStr (golint)
    • Line 21: warning: don't use underscores in Go names; struct field Partner_trade_no should be PartnerTradeNo (golint)
    • Line 23: warning: don't use underscores in Go names; struct field Check_name should be CheckName (golint)
    • Line 24: warning: don't use underscores in Go names; struct field Re_user_name should be ReUserName (golint)
    • Line 27: warning: don't use underscores in Go names; struct field Spbill_create_ip should be SpbillCreateIP (golint)
    • Line 32: warning: comment on exported type WithdrawalResponse_wxbalance should be of the form "WithdrawalResponse_wxbalance ..." (with optional leading article) (golint)
    • Line 33: warning: don't use underscores in Go names; type WithdrawalResponse_wxbalance should be WithdrawalResponseWxbalance (golint)
    • Line 36: warning: don't use underscores in Go names; struct field Mch_appid should be MchAppid (golint)
    • Line 38: warning: don't use underscores in Go names; struct field Device_info should be DeviceInfo (golint)
    • Line 43: warning: don't use underscores in Go names; struct field Partner_trade_no should be PartnerTradeNo (golint)
    • Line 44: warning: don't use underscores in Go names; struct field Payment_no should be PaymentNo (golint)
    • Line 45: warning: don't use underscores in Go names; struct field Payment_time should be PaymentTime (golint)
    • Line 52: warning: exported method Pay.Withdrawal_wxbalance should have comment or be unexported (golint)
    • Line 52: warning: don't use underscores in Go names; method Withdrawal_wxbalance should be WithdrawalWxbalance (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words

    • wechat/device/authorize.go
    • Line 44: warning: "andriod" is a misspelling of "android" (misspell)
    • Line 44: warning: "andriod" is a misspelling of "android" (misspell)
    • Line 59: warning: "manufature" is a misspelling of "manufacture" (misspell)