Preparing report...

Report for github.com/wzshiming/protomux

A+    Excellent!    Found 33 issues across 49 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo97%

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.


golint34%

Golint is a linter for Go source code.

    • protomux/server/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 15: warning: exported type Listen should have comment or be unexported (golint)
    • Line 20: warning: exported method Config.Check should have comment or be unexported (golint)
    • protomux/http/serve.go
    • Line 18: warning: exported const ResponseServerName should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type Serve should have comment or be unexported (golint)
    • Line 27: warning: exported function NewServe should have comment or be unexported (golint)
    • Line 42: warning: exported method Serve.ServeConn should have comment or be unexported (golint)
    • protomux/server/server.go
    • Line 17: warning: exported var ErrDiffListenAddress should have comment or be unexported (golint)
    • Line 24: warning: exported function GetCtxServer should have comment or be unexported (golint)
    • Line 36: warning: exported type Server should have comment or be unexported (golint)
    • Line 44: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 79: warning: exported method Server.Reload should have comment or be unexported (golint)
    • Line 97: warning: exported method Server.Close should have comment or be unexported (golint)
    • Line 104: warning: exported method Server.Start should have comment or be unexported (golint)
    • Line 114: warning: exported method Server.Addr should have comment or be unexported (golint)
    • protomux/conn/modules/dialer/dialer.go
    • Line 11: warning: exported type Dialer should have comment or be unexported (golint)
    • Line 17: warning: exported function NewDialer should have comment or be unexported (golint)
    • Line 28: warning: exported method Dialer.ServeConn should have comment or be unexported (golint)
    • protomux/conn/mux/mux.go
    • Line 23: warning: exported var ErrNotAddress should have comment or be unexported (golint)
    • Line 27: warning: exported function NewMuxWithConfig should have comment or be unexported (golint)
    • Line 65: warning: comment on exported function NewMux should be of the form "NewMux ..." (golint)
    • Line 78: warning: exported method Mux.Pattern should have comment or be unexported (golint)
    • Line 187: warning: exported method Mux.UnmarshalJSON should have comment or be unexported (golint)
    • protomux/http/template/template.go
    • Line 12: warning: exported type Template should have comment or be unexported (golint)
    • Line 128: warning: exported method Template.Format should have comment or be unexported (golint)
    • Line 137: warning: exported method Template.FormatString should have comment or be unexported (golint)
    • protomux/http/modules/handler.go
    • Line 12: warning: exported type GetHandlerFunc should have comment or be unexported (golint)
    • Line 14: warning: exported function Register should have comment or be unexported (golint)
    • Line 38: warning: exported type Handlers should have comment or be unexported (golint)
    • Line 46: warning: exported method Handlers.UnmarshalJSON should have comment or be unexported (golint)
    • Line 65: warning: exported function GetHandler should have comment or be unexported (golint)
    • protomux/util/listener.go
    • Line 8: warning: exported type Listener should have comment or be unexported (golint)
    • Line 12: warning: exported function NewListener should have comment or be unexported (golint)
    • protomux/conn/mux/logline/logline.go
    • Line 12: warning: exported type Log should have comment or be unexported (golint)
    • Line 17: warning: exported function NewLog should have comment or be unexported (golint)
    • Line 24: warning: exported method Log.ServeConn should have comment or be unexported (golint)
    • protomux/http/template/text.go
    • Line 9: warning: exported type Text should have comment or be unexported (golint)
    • Line 11: warning: exported method Text.Format should have comment or be unexported (golint)
    • Line 16: warning: exported method Text.FormatString should have comment or be unexported (golint)
    • protomux/config/config.go
    • Line 12: warning: exported type Configs should have comment or be unexported (golint)
    • Line 16: warning: exported method Configs.GetServerConfig should have comment or be unexported (golint)
    • Line 28: warning: exported type Config should have comment or be unexported (golint)
    • Line 33: warning: exported method Config.Check should have comment or be unexported (golint)
    • Line 40: warning: exported method Config.GetServerConfig should have comment or be unexported (golint)
    • protomux/config/load.go
    • Line 10: warning: exported function Load should have comment or be unexported (golint)
    • Line 22: warning: exported function LoadFile should have comment or be unexported (golint)
    • protomux/conn/modules/handler.go
    • Line 13: warning: exported type GetHandlerFunc should have comment or be unexported (golint)
    • Line 15: warning: exported function Register should have comment or be unexported (golint)
    • Line 39: warning: exported type Handler should have comment or be unexported (golint)
    • Line 43: warning: exported type Handlers should have comment or be unexported (golint)
    • Line 45: warning: exported method Handlers.ServeConn should have comment or be unexported (golint)
    • Line 51: warning: exported method Handlers.UnmarshalJSON should have comment or be unexported (golint)
    • Line 70: warning: exported function GetHandler should have comment or be unexported (golint)
    • protomux/conn/modules/tls/tls.go
    • Line 13: warning: exported type TLS should have comment or be unexported (golint)
    • Line 18: warning: exported function NewTLS should have comment or be unexported (golint)
    • Line 25: warning: exported method TLS.ServeConn should have comment or be unexported (golint)
    • protomux/cert/cert.go
    • Line 15: warning: exported function GetTlsConfig should have comment or be unexported (golint)
    • Line 45: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • protomux/http/mux/mux.go
    • Line 19: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 22: warning: exported function NewMuxWithConfig should have comment or be unexported (golint)
    • protomux/util/unread.go
    • Line 8: warning: exported function UnreadConn should have comment or be unexported (golint)
    • Line 24: warning: exported function Unread should have comment or be unexported (golint)
    • protomux/server/multi_server.go
    • Line 7: warning: exported type MultiServer should have comment or be unexported (golint)
    • Line 13: warning: exported function NewMultiServer should have comment or be unexported (golint)
    • Line 20: warning: exported method MultiServer.Start should have comment or be unexported (golint)
    • Line 37: warning: exported method MultiServer.Wait should have comment or be unexported (golint)
    • Line 41: warning: exported method MultiServer.Run should have comment or be unexported (golint)
    • Line 51: warning: exported method MultiServer.Close should have comment or be unexported (golint)
    • Line 61: warning: exported method MultiServer.Reload should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!