Preparing report...

Report for github.com/sohlich/nats-proxy

A+    Excellent!    Found 9 issues across 14 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!


gocyclo92%

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.


golint50%

Golint is a linter for Go source code.

    • nats-proxy/client.go
    • Line 150: 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 161: warning: exported method NatsClient.SendGET should have comment or be unexported (golint)
    • Line 165: warning: exported method NatsClient.SendPOST should have comment or be unexported (golint)
    • Line 169: warning: exported method NatsClient.SendDELETE should have comment or be unexported (golint)
    • Line 173: warning: exported method NatsClient.SendPUT should have comment or be unexported (golint)
    • Line 177: warning: exported method NatsClient.Send should have comment or be unexported (golint)
    • nats-proxy/protobuf.go
    • Line 3: warning: exported type Variables should have comment or be unexported (golint)
    • Line 5: warning: exported method Variables.Get should have comment or be unexported (golint)
    • Line 8: 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 13: warning: exported method Variables.Set should have comment or be unexported (golint)
    • Line 17: warning: exported method Variables.Add should have comment or be unexported (golint)
    • Line 25: warning: exported method Variables.Del should have comment or be unexported (golint)
    • nats-proxy/request.go
    • Line 14: warning: exported method Request.GetHeader should have comment or be unexported (golint)
    • Line 21: warning: exported method Request.GetForm should have comment or be unexported (golint)
    • Line 37: warning: exported method Request.IsWebSocket should have comment or be unexported (golint)
    • Line 41: warning: exported method Request.GetWebSocketID should have comment or be unexported (golint)
    • Line 45: warning: exported method Request.FromHTTP should have comment or be unexported (golint)
    • Line 78: warning: exported function NewRequest should have comment or be unexported (golint)
    • Line 86: warning: receiver name req should be consistent with previous receiver name r for Request (golint)
    • Line 95: warning: exported type RequestPool should have comment or be unexported (golint)
    • Line 99: warning: exported method RequestPool.GetRequest should have comment or be unexported (golint)
    • Line 104: warning: exported method RequestPool.PutRequest should have comment or be unexported (golint)
    • Line 109: warning: exported function NewRequestPool should have comment or be unexported (golint)
    • nats-proxy/response.go
    • Line 10: warning: exported method Response.GetHeader should have comment or be unexported (golint)
    • Line 28: warning: comment on exported method Response.ReadFrom should be of the form "ReadFrom ..." (golint)
    • Line 41: warning: receiver name res should be consistent with previous receiver name r for Response (golint)
    • Line 48: warning: exported type ResponsePool should have comment or be unexported (golint)
    • Line 52: warning: exported method ResponsePool.GetResponse should have comment or be unexported (golint)
    • Line 57: warning: exported method ResponsePool.PutResponse should have comment or be unexported (golint)
    • Line 62: warning: exported function NewResponsePool should have comment or be unexported (golint)
    • nats-proxy/util.go
    • Line 19: warning: don't use underscores in Go names; const ws_IN should be wsIN (golint)
    • Line 23: warning: don't use underscores in Go names; const ws_OUT should be wsOUT (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.


misspell85%

Misspell Finds commonly misspelled English words