Report for github.com/TargetLiu/wechat

A+    Excellent!    Found 18 issues across 39 files

Tweet

gofmt97%

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!


gocyclo100%

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.

No problems detected. Good job!


golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign56%

IneffAssign detects ineffectual assignments in Go code.

    • wechat/examples/gin/gin.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/TargetLiu/wechat (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/TargetLiu/wechat/message (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/gin-gonic/gin (invalid package name: "") (ineffassign)
    • wechat/examples/beego/beego.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/TargetLiu/wechat (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/TargetLiu/wechat/message (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/astaxie/beego (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/astaxie/beego/context (invalid package name: "") (ineffassign)
    • wechat/cache/memcache.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/bradfitz/gomemcache/memcache (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/bradfitz/gomemcache/memcache (invalid package name: "") (ineffassign)
    • wechat/context/context.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/TargetLiu/wechat/cache (invalid package name: "") (ineffassign)
    • wechat/user/user.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 50: warning: user.GetAccessToken undefined (type *User has no field or method GetAccessToken) (ineffassign)
    • Line 66: warning: userInfo.ErrCode undefined (type *Info has no field or method ErrCode) (ineffassign)
    • Line 67: warning: userInfo.ErrCode undefined (type *Info has no field or method ErrCode) (ineffassign)
    • Line 67: warning: userInfo.ErrMsg undefined (type *Info has no field or method ErrMsg) (ineffassign)
    • wechat/examples/http/http.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/TargetLiu/wechat (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/TargetLiu/wechat/message (invalid package name: "") (ineffassign)
    • wechat/oauth/oauth.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 37: warning: oauth.AppID undefined (type *Oauth has no field or method AppID) (ineffassign)
    • Line 63: warning: oauth.AppID undefined (type *Oauth has no field or method AppID) (ineffassign)
    • Line 63: warning: oauth.AppSecret undefined (type *Oauth has no field or method AppSecret) (ineffassign)
    • Line 73: warning: result.ErrCode undefined (type ResAccessToken has no field or method ErrCode) (ineffassign)
    • Line 74: warning: result.ErrCode undefined (type ResAccessToken has no field or method ErrCode) (ineffassign)
    • Line 74: warning: result.ErrMsg undefined (type ResAccessToken has no field or method ErrMsg) (ineffassign)
    • Line 82: warning: oauth.AppID undefined (type *Oauth has no field or method AppID) (ineffassign)
    • Line 92: warning: result.ErrCode undefined (type ResAccessToken has no field or method ErrCode) (ineffassign)
    • Line 93: warning: result.ErrCode undefined (type ResAccessToken has no field or method ErrCode) (ineffassign)
    • Line 93: warning: result.ErrMsg undefined (type ResAccessToken has no field or method ErrMsg) (ineffassign)
    • Line 147: warning: result.ErrCode undefined (type UserInfo has no field or method ErrCode) (ineffassign)
    • Line 148: warning: result.ErrCode undefined (type UserInfo has no field or method ErrCode) (ineffassign)
    • Line 148: warning: result.ErrMsg undefined (type UserInfo has no field or method ErrMsg) (ineffassign)
    • wechat/pay/pay.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 91: warning: pcf.AppID undefined (type *Pay has no field or method AppID) (ineffassign)
    • Line 91: warning: pcf.PayMchID undefined (type *Pay has no field or method PayMchID) (ineffassign)
    • Line 91: warning: pcf.PayNotifyURL undefined (type *Pay has no field or method PayNotifyURL) (ineffassign)
    • Line 91: warning: pcf.PayKey undefined (type *Pay has no field or method PayKey) (ineffassign)
    • Line 94: warning: pcf.AppID undefined (type *Pay has no field or method AppID) (ineffassign)
    • Line 95: warning: pcf.PayMchID undefined (type *Pay has no field or method PayMchID) (ineffassign)
    • Line 102: warning: pcf.PayNotifyURL undefined (type *Pay has no field or method PayNotifyURL) (ineffassign)
    • wechat/menu/menu.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 123: warning: menu.GetAccessToken undefined (type *Menu has no field or method GetAccessToken) (ineffassign)
    • Line 151: warning: menu.GetAccessToken undefined (type *Menu has no field or method GetAccessToken) (ineffassign)
    • Line 165: warning: resMenu.ErrCode undefined (type ResMenu has no field or method ErrCode) (ineffassign)
    • Line 166: warning: resMenu.ErrCode undefined (type ResMenu has no field or method ErrCode) (ineffassign)
    • Line 166: warning: resMenu.ErrMsg undefined (type ResMenu has no field or method ErrMsg) (ineffassign)
    • Line 174: warning: menu.GetAccessToken undefined (type *Menu has no field or method GetAccessToken) (ineffassign)
    • Line 196: warning: menu.GetAccessToken undefined (type *Menu has no field or method GetAccessToken) (ineffassign)
    • Line 224: warning: menu.GetAccessToken undefined (type *Menu has no field or method GetAccessToken) (ineffassign)
    • Line 252: warning: menu.GetAccessToken undefined (type *Menu has no field or method GetAccessToken) (ineffassign)
    • Line 268: warning: resMenuTryMatch.ErrCode undefined (type resMenuTryMatch has no field or method ErrCode) (ineffassign)
    • Line 269: warning: resMenuTryMatch.ErrCode undefined (type resMenuTryMatch has no field or method ErrCode) (ineffassign)
    • Line 269: warning: resMenuTryMatch.ErrMsg undefined (type resMenuTryMatch has no field or method ErrMsg) (ineffassign)
    • Line 279: warning: menu.GetAccessToken undefined (type *Menu has no field or method GetAccessToken) (ineffassign)
    • Line 294: warning: resSelfMenuInfo.ErrCode undefined (type ResSelfMenuInfo has no field or method ErrCode) (ineffassign)
    • Line 295: warning: resSelfMenuInfo.ErrCode undefined (type ResSelfMenuInfo has no field or method ErrCode) (ineffassign)
    • Line 295: warning: resSelfMenuInfo.ErrMsg undefined (type ResSelfMenuInfo has no field or method ErrMsg) (ineffassign)
    • wechat/template/template.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 56: warning: tpl.GetAccessToken undefined (type *Template has no field or method GetAccessToken) (ineffassign)
    • Line 68: warning: result.ErrCode undefined (type resTemplateSend has no field or method ErrCode) (ineffassign)
    • Line 69: warning: result.ErrCode undefined (type resTemplateSend has no field or method ErrCode) (ineffassign)
    • Line 69: warning: result.ErrMsg undefined (type resTemplateSend has no field or method ErrMsg) (ineffassign)
    • wechat/material/material.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 58: warning: material.GetAccessToken undefined (type *Material has no field or method GetAccessToken) (ineffassign)
    • Line 88: warning: material.GetAccessToken undefined (type *Material has no field or method GetAccessToken) (ineffassign)
    • Line 104: warning: resMaterial.ErrCode undefined (type resAddMaterial has no field or method ErrCode) (ineffassign)
    • Line 105: warning: resMaterial.ErrCode undefined (type resAddMaterial has no field or method ErrCode) (ineffassign)
    • Line 105: warning: resMaterial.ErrMsg undefined (type resAddMaterial has no field or method ErrMsg) (ineffassign)
    • Line 121: warning: material.GetAccessToken undefined (type *Material has no field or method GetAccessToken) (ineffassign)
    • Line 162: warning: resMaterial.ErrCode undefined (type resAddMaterial has no field or method ErrCode) (ineffassign)
    • Line 163: warning: resMaterial.ErrCode undefined (type resAddMaterial has no field or method ErrCode) (ineffassign)
    • Line 163: warning: resMaterial.ErrMsg undefined (type resAddMaterial has no field or method ErrMsg) (ineffassign)
    • Line 177: warning: material.GetAccessToken undefined (type *Material has no field or method GetAccessToken) (ineffassign)
    • wechat/material/media.go
    • Line 43: warning: material.GetAccessToken undefined (type *Material has no field or method GetAccessToken) (ineffassign)
    • Line 58: warning: media.ErrCode undefined (type Media has no field or method ErrCode) (ineffassign)
    • Line 59: warning: media.ErrCode undefined (type Media has no field or method ErrCode) (ineffassign)
    • Line 59: warning: media.ErrMsg undefined (type Media has no field or method ErrMsg) (ineffassign)
    • Line 69: warning: material.GetAccessToken undefined (type *Material has no field or method GetAccessToken) (ineffassign)
    • Line 87: warning: material.GetAccessToken undefined (type *Material has no field or method GetAccessToken) (ineffassign)
    • Line 103: warning: image.ErrCode undefined (type resMediaImage has no field or method ErrCode) (ineffassign)
    • Line 104: warning: image.ErrCode undefined (type resMediaImage has no field or method ErrCode) (ineffassign)
    • Line 104: warning: image.ErrMsg undefined (type resMediaImage has no field or method ErrMsg) (ineffassign)
    • wechat/js/js.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 57: warning: js.AppID undefined (type *Js has no field or method AppID) (ineffassign)
    • Line 66: warning: js.GetJsAPITicketLock undefined (type *Js has no field or method GetJsAPITicketLock) (ineffassign)
    • Line 67: warning: js.GetJsAPITicketLock undefined (type *Js has no field or method GetJsAPITicketLock) (ineffassign)
    • Line 70: warning: js.AppID undefined (type *Js has no field or method AppID) (ineffassign)
    • Line 71: warning: js.Cache undefined (type *Js has no field or method Cache) (ineffassign)
    • Line 88: warning: js.GetAccessToken undefined (type *Js has no field or method GetAccessToken) (ineffassign)
    • Line 100: warning: ticket.ErrCode undefined (type resTicket has no field or method ErrCode) (ineffassign)
    • Line 101: warning: ticket.ErrCode undefined (type resTicket has no field or method ErrCode) (ineffassign)
    • Line 101: warning: ticket.ErrMsg undefined (type resTicket has no field or method ErrMsg) (ineffassign)
    • Line 105: warning: js.AppID undefined (type *Js has no field or method AppID) (ineffassign)
    • Line 107: warning: js.Cache undefined (type *Js has no field or method Cache) (ineffassign)
    • wechat/cache/redis.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/garyburd/redigo/redis (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/garyburd/redigo/redis (invalid package name: "") (ineffassign)
    • wechat/server/server.go
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/TargetLiu/wechat/message (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 49: warning: srv.GetQuery undefined (type *Server has no field or method GetQuery) (ineffassign)
    • Line 51: warning: srv.String undefined (type *Server has no field or method String) (ineffassign)
    • Line 68: warning: srv.Query undefined (type *Server has no field or method Query) (ineffassign)
    • Line 69: warning: srv.Query undefined (type *Server has no field or method Query) (ineffassign)
    • Line 70: warning: srv.Query undefined (type *Server has no field or method Query) (ineffassign)
    • Line 71: warning: srv.Token undefined (type *Server has no field or method Token) (ineffassign)
    • Line 78: warning: srv.Query undefined (type *Server has no field or method Query) (ineffassign)
    • Line 84: warning: srv.Query undefined (type *Server has no field or method Query) (ineffassign)
    • Line 111: warning: srv.Request undefined (type *Server has no field or method Request) (ineffassign)
    • Line 116: warning: srv.Query undefined (type *Server has no field or method Query) (ineffassign)
    • Line 121: warning: srv.Query undefined (type *Server has no field or method Query) (ineffassign)
    • Line 123: warning: srv.Query undefined (type *Server has no field or method Query) (ineffassign)
    • Line 124: warning: srv.Token undefined (type *Server has no field or method Token) (ineffassign)
    • Line 130: warning: srv.AppID undefined (type *Server has no field or method AppID) (ineffassign)
    • Line 130: warning: srv.EncodingAESKey undefined (type *Server has no field or method EncodingAESKey) (ineffassign)
    • Line 135: warning: srv.Request undefined (type *Server has no field or method Request) (ineffassign)
    • Line 213: warning: srv.AppID undefined (type *Server has no field or method AppID) (ineffassign)
    • Line 213: warning: srv.EncodingAESKey undefined (type *Server has no field or method EncodingAESKey) (ineffassign)
    • Line 220: warning: srv.Token undefined (type *Server has no field or method Token) (ineffassign)
    • Line 229: warning: srv.XML undefined (type *Server has no field or method XML) (ineffassign)
    • wechat/wechat.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/TargetLiu/wechat/cache (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/TargetLiu/wechat/context (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/TargetLiu/wechat/js (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/TargetLiu/wechat/material (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/TargetLiu/wechat/menu (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/TargetLiu/wechat/oauth (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/TargetLiu/wechat/pay (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/TargetLiu/wechat/server (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/TargetLiu/wechat/template (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/TargetLiu/wechat/user (invalid package name: "") (ineffassign)
    • wechat/context/access_token.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/TargetLiu/wechat/util (invalid package name: "") (ineffassign)
    • Line 65: warning: resAccessToken.ErrMsg undefined (type ResAccessToken has no field or method ErrMsg) (ineffassign)
    • Line 66: warning: resAccessToken.ErrCode undefined (type ResAccessToken has no field or method ErrCode) (ineffassign)
    • Line 66: warning: resAccessToken.ErrMsg undefined (type ResAccessToken has no field or method ErrMsg) (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!