Preparing report...

Report for github.com/rsms/gotalk

A+    Excellent!    Found 16 issues across 35 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!


golint57%

Golint is a linter for Go source code.

    • gotalk/examples/tcp/main.go
    • Line 4: warning: comment on exported type GreetIn should be of the form "GreetIn ..." (with optional leading article) (golint)
    • Line 9: warning: exported type GreetOut should have comment or be unexported (golint)
    • gotalk/doc.go
    • Line 1: warning: package comment should be of the form "Package gotalk ..." (golint)
    • gotalk/handle.go
    • Line 35: warning: comment on exported type BufferReqHandler should be of the form "BufferReqHandler ..." (with optional leading article) (golint)
    • Line 38: warning: exported type BufferNoteHandler should have comment or be unexported (golint)
    • Line 40: warning: comment on exported type StreamReqHandler should be of the form "StreamReqHandler ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported var DefaultHandlers should be of the form "DefaultHandlers ..." (golint)
    • Line 67: warning: comment on exported function HandleBufferRequest should be of the form "HandleBufferRequest ..." (golint)
    • Line 73: warning: comment on exported function HandleStreamRequest should be of the form "HandleStreamRequest ..." (golint)
    • Line 79: warning: comment on exported function HandleNotification should be of the form "HandleNotification ..." (golint)
    • Line 92: warning: comment on exported function HandleBufferNotification should be of the form "HandleBufferNotification ..." (golint)
    • Line 133: warning: comment on exported method Handlers.HandleBufferRequest should be of the form "HandleBufferRequest ..." (golint)
    • Line 148: warning: comment on exported method Handlers.HandleStreamRequest should be of the form "HandleStreamRequest ..." (golint)
    • Line 163: warning: comment on exported method Handlers.HandleNotification should be of the form "HandleNotification ..." (golint)
    • Line 176: warning: comment on exported method Handlers.HandleBufferNotification should be of the form "HandleBufferNotification ..." (golint)
    • Line 191: warning: comment on exported method Handlers.FindBufferRequestHandler should be of the form "FindBufferRequestHandler ..." (golint)
    • Line 204: warning: comment on exported method Handlers.FindStreamRequestHandler should be of the form "FindStreamRequestHandler ..." (golint)
    • Line 217: warning: comment on exported method Handlers.FindNotificationHandler should be of the form "FindNotificationHandler ..." (golint)
    • Line 254: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 386: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gotalk/protocol.go
    • Line 12: warning: comment on exported const ProtocolVersion should be of the form "ProtocolVersion ..." (golint)
    • Line 37: warning: comment on exported type MsgType should be of the form "MsgType ..." (with optional leading article) (golint)
    • Line 40: warning: comment on exported function WriteVersion should be of the form "WriteVersion ..." (golint)
    • Line 45: warning: comment on exported function ReadVersion should be of the form "ReadVersion ..." (golint)
    • Line 62: warning: comment on exported var HeartbeatMsgMaxLoad should be of the form "HeartbeatMsgMaxLoad ..." (golint)
    • Line 65: warning: comment on exported function MakeHeartbeatMsg should be of the form "MakeHeartbeatMsg ..." (golint)
    • Line 76: warning: comment on exported function MakeMsg should be of the form "MakeMsg ..." (golint)
    • Line 127: warning: comment on exported function ReadMsg should be of the form "ReadMsg ..." (golint)
    • Line 223: warning: comment on exported function FormatRequestID should be of the form "FormatRequestID ..." (golint)
    • gotalk/request.go
    • Line 3: warning: exported type Request should have comment or be unexported (golint)
    • Line 9: warning: comment on exported function NewRequest should be of the form "NewRequest ..." (golint)
    • Line 14: warning: exported type StreamRequest should have comment or be unexported (golint)
    • Line 37: warning: exported method StreamRequest.End should have comment or be unexported (golint)
    • gotalk/server.go
    • Line 12: warning: exported type SockHandler should have comment or be unexported (golint)
    • Line 14: warning: comment on exported type Server should be of the form "Server ..." (with optional leading article) (golint)
    • Line 38: warning: comment on exported function NewServer should be of the form "NewServer ..." (golint)
    • Line 43: warning: comment on exported function Listen should be of the form "Listen ..." (golint)
    • Line 59: warning: comment on exported function ListenTLS should be of the form "ListenTLS ..." (golint)
    • Line 76: warning: comment on exported function ListenTLSCustom should be of the form "ListenTLSCustom ..." (golint)
    • Line 93: warning: comment on exported method Server.EnableUnixSocketGC should be of the form "EnableUnixSocketGC ..." (golint)
    • Line 109: warning: comment on exported function Serve should be of the form "Serve ..." (golint)
    • Line 156: warning: comment on exported method Server.Addr should be of the form "Addr ..." (golint)
    • Line 164: warning: comment on exported method Server.Close should be of the form "Close ..." (golint)
    • gotalk/sock.go
    • Line 25: warning: exported type Sock should have comment or be unexported (golint)
    • Line 75: warning: exported function NewSock should have comment or be unexported (golint)
    • Line 83: warning: comment on exported function Pipe should be of the form "Pipe ..." (golint)
    • Line 109: warning: comment on exported function ConnectTLS should be of the form "ConnectTLS ..." (golint)
    • Line 140: warning: comment on exported method Sock.ConnectTLS should be of the form "ConnectTLS ..." (golint)
    • Line 159: warning: comment on exported method Sock.ConnectReader should be of the form "ConnectReader ..." (golint)
    • Line 170: warning: comment on exported method Sock.Conn should be of the form "Conn ..." (golint)
    • Line 255: warning: comment on exported method Sock.SendRequest should be of the form "SendRequest ..." (golint)
    • Line 280: warning: comment on exported method Sock.BufferRequest should be of the form "BufferRequest ..." (golint)
    • Line 326: warning: comment on exported method Sock.Request should be of the form "Request ..." (golint)
    • Line 339: warning: comment on exported method Sock.StreamRequest should be of the form "StreamRequest ..." (golint)
    • Line 346: warning: comment on exported method Sock.BufferNotify should be of the form "BufferNotify ..." (golint)
    • Line 354: warning: comment on exported method Sock.Notify should be of the form "Notify ..." (golint)
    • Line 358: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 490: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 602: warning: comment on exported method Sock.Handshake should be of the form "Handshake ..." (golint)
    • Line 618: warning: exported var ErrAbnormal should have comment or be unexported (golint)
    • Line 666: warning: exported method Sock.SendHeartbeat should have comment or be unexported (golint)
    • Line 825: warning: comment on exported method Sock.Addr should be of the form "Addr ..." (golint)
    • Line 836: warning: comment on exported method Sock.CloseError should be of the form "CloseError ..." (golint)
    • Line 913: warning: comment on exported method Sock.Shutdown should be of the form "Shutdown ..." (golint)
    • gotalk/examples/tls/main.go
    • Line 6: warning: comment on exported type GreetIn should be of the form "GreetIn ..." (with optional leading article) (golint)
    • Line 11: warning: exported type GreetOut should have comment or be unexported (golint)
    • gotalk/limits.go
    • Line 29: warning: exported type Limits should have comment or be unexported (golint)
    • Line 42: warning: comment on exported function NewLimits should be of the form "NewLimits ..." (golint)
    • gotalk/response.go
    • Line 5: warning: exported type Response should have comment or be unexported (golint)
    • Line 16: warning: comment on exported method Response.IsError should be of the form "IsError ..." (golint)
    • Line 21: warning: comment on exported method Response.IsRetry should be of the form "IsRetry ..." (golint)
    • Line 26: warning: comment on exported method Response.IsStreaming should be of the form "IsStreaming ..." (golint)
    • gotalk/version.go
    • Line 3: warning: comment on exported const Version should be of the form "Version ..." (golint)
    • gotalk/websocket.go
    • Line 116: warning: comment on exported function WebSocketHandler should be of the form "WebSocketHandler ..." (golint)
    • Line 151: warning: receiver name server should be consistent with previous receiver name s for WebSocketServer (golint)
    • gotalk/jslib.go
    • Line 3: warning: exported const JSLibSHA1Base64 should have comment or be unexported (golint)
    • Line 4: warning: exported const JSLibString should have comment or be unexported (golint)
    • gotalk/examples/websocket-chat/server.go
    • Line 21: warning: exported type Room should have comment or be unexported (golint)
    • Line 33: warning: exported type Message should have comment or be unexported (golint)
    • Line 38: warning: exported type NewMessage should have comment or be unexported (golint)
    • Line 43: warning: exported type RoomMap should have comment or be unexported (golint)

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!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell94%

Misspell Finds commonly misspelled English words

    • gotalk/sock.go
    • Line 16: warning: "recieved" is a misspelling of "received" (misspell)
    • Line 33: warning: "alltogether" is a misspelling of "altogether" (misspell)
    • Line 277: warning: "procotol" is a misspelling of "protocol" (misspell)
    • Line 686: warning: "succesful" is a misspelling of "successful" (misspell)
    • Line 873: warning: "procotol" is a misspelling of "protocol" (misspell)