Preparing report...

Report for github.com/xblockchainlabs/myqueue

A    Great!    Found 13 issues across 13 files

Tweet

gofmt92%

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!


golint0%

Golint is a linter for Go source code.

    • myqueue/consumer.go
    • Line 10: warning: exported type ConsumerGroup should have comment or be unexported (golint)
    • Line 16: warning: exported function NewCG should have comment or be unexported (golint)
    • Line 21: warning: exported method ConsumerGroup.AddWorker should have comment or be unexported (golint)
    • Line 33: warning: exported method ConsumerGroup.Start should have comment or be unexported (golint)
    • myqueue/models/tx.go
    • Line 10: warning: exported type Tx should have comment or be unexported (golint)
    • Line 17: warning: exported method Tx.Close should have comment or be unexported (golint)
    • Line 29: warning: exported method Tx.Fail should have comment or be unexported (golint)
    • Line 34: warning: exported function NewTx should have comment or be unexported (golint)
    • myqueue/utils/db.go
    • Line 11: warning: exported type Connection should have comment or be unexported (golint)
    • Line 37: warning: exported function SetConnection should have comment or be unexported (golint)
    • Line 60: warning: comment on exported function GetDB should be of the form "GetDB ..." (golint)
    • myqueue/worker.go
    • Line 11: warning: exported type WorkerFunc should have comment or be unexported (golint)
    • Line 13: warning: exported function Allocator should have comment or be unexported (golint)
    • Line 22: warning: exported function Collector should have comment or be unexported (golint)
    • Line 58: warning: exported function Worker should have comment or be unexported (golint)
    • Line 75: warning: exported function ZeroBackoff should have comment or be unexported (golint)
    • Line 83: warning: exported function ConstanBackoff should have comment or be unexported (golint)
    • Line 91: warning: exported function GeometricBackoff should have comment or be unexported (golint)
    • Line 99: warning: exported function ListBackoff should have comment or be unexported (golint)
    • myqueue/workerpool.go
    • Line 14: warning: comment on exported type AllocationFunc should be of the form "AllocationFunc ..." (with optional leading article) (golint)
    • Line 17: warning: exported type ResultFunc should have comment or be unexported (golint)
    • Line 30: warning: comment on exported type Pool should be of the form "Pool ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported function NewPool should be of the form "NewPool ..." (golint)
    • Line 61: warning: exported method Pool.Start should have comment or be unexported (golint)
    • myqueue/models/jobs.go
    • Line 11: warning: exported type JSON should have comment or be unexported (golint)
    • Line 13: warning: exported method JSON.Scan should have comment or be unexported (golint)
    • Line 26: warning: exported method JSON.Value should have comment or be unexported (golint)
    • Line 33: warning: exported method JSON.MarshalJSON should have comment or be unexported (golint)
    • Line 40: warning: exported method JSON.UnmarshalJSON should have comment or be unexported (golint)
    • Line 48: warning: exported method JSON.IsNull should have comment or be unexported (golint)
    • Line 52: warning: exported method JSON.Equals should have comment or be unexported (golint)
    • Line 52: warning: receiver name j1 should be consistent with previous receiver name j for JSON (golint)
    • Line 56: warning: exported type JobStatus should have comment or be unexported (golint)
    • Line 59: warning: exported const OpenJob should have comment (or a comment on this block) or be unexported (golint)
    • Line 64: warning: exported method JobStatus.Scan should have comment or be unexported (golint)
    • Line 65: warning: exported method JobStatus.Value should have comment or be unexported (golint)
    • Line 67: warning: exported type Job should have comment or be unexported (golint)
    • Line 77: warning: exported method Job.Save should have comment or be unexported (golint)
    • myqueue/models/schedules.go
    • Line 11: warning: exported type ScheduleStatus should have comment or be unexported (golint)
    • Line 14: warning: exported const Open should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported method ScheduleStatus.Scan should have comment or be unexported (golint)
    • Line 22: warning: exported method ScheduleStatus.Value should have comment or be unexported (golint)
    • Line 24: warning: exported type Schedule should have comment or be unexported (golint)
    • Line 36: warning: exported method Schedule.IsEmpty should have comment or be unexported (golint)
    • Line 40: warning: exported method Schedule.Save should have comment or be unexported (golint)
    • Line 45: warning: exported method Schedule.Update should have comment or be unexported (golint)
    • Line 50: warning: exported method Schedule.BeforeSave should have comment or be unexported (golint)
    • myqueue/models/worker.helper.go
    • Line 10: warning: exported function SelectJob should have comment or be unexported (golint)
    • Line 19: warning: exported function AcquireJob should have comment or be unexported (golint)
    • Line 39: warning: exported function CompleteJob should have comment or be unexported (golint)
    • Line 62: warning: exported function FailJob should have comment or be unexported (golint)
    • myqueue/utils/backoff.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 11: warning: exported type BackoffMethod should have comment or be unexported (golint)
    • Line 14: warning: exported const NoAttempt should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Backoff should have comment or be unexported (golint)
    • Line 27: warning: exported function NewBackoff should have comment or be unexported (golint)
    • Line 41: warning: exported method Backoff.AttemptAllowed should have comment or be unexported (golint)
    • Line 46: warning: exported method Backoff.GetDelay should have comment or be unexported (golint)
    • myqueue/utils/log.go
    • Line 18: warning: exported function SetLogger should have comment or be unexported (golint)
    • Line 28: warning: exported function LogFlush should have comment or be unexported (golint)
    • Line 32: warning: exported function InfoLog should have comment or be unexported (golint)
    • Line 36: warning: exported function InfoLogf should have comment or be unexported (golint)
    • Line 41: warning: exported function WarningLog should have comment or be unexported (golint)
    • Line 45: warning: exported function WarningLogf should have comment or be unexported (golint)
    • Line 49: warning: exported function ErrorLog should have comment or be unexported (golint)
    • Line 53: warning: exported function ErrorLogf should have comment or be unexported (golint)
    • Line 57: warning: exported function FatalLog should have comment or be unexported (golint)
    • Line 61: warning: exported function FataLogf 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!