Preparing report...

Report for github.com/nektro/go-util

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


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!


golint40%

Golint is a linter for Go source code.

    • go-util/arrays/stringsu/strings.go
    • Line 3: warning: exported function Contains should have comment or be unexported (golint)
    • Line 12: warning: exported function Filter should have comment or be unexported (golint)
    • Line 22: warning: exported function Map should have comment or be unexported (golint)
    • Line 30: warning: exported function Remove should have comment or be unexported (golint)
    • go-util/types/semaphore.go
    • Line 5: warning: exported type Semaphore should have comment or be unexported (golint)
    • Line 9: warning: exported function NewSemaphore should have comment or be unexported (golint)
    • Line 17: warning: exported method Semaphore.Add should have comment or be unexported (golint)
    • Line 21: warning: exported method Semaphore.Done should have comment or be unexported (golint)
    • go-util/mbpp/mbpp.go
    • Line 30: warning: exported var BarStyle should have comment or be unexported (golint)
    • Line 40: warning: exported function Init should have comment or be unexported (golint)
    • Line 57: warning: exported function CreateJob should have comment or be unexported (golint)
    • Line 86: warning: exported function Wait should have comment or be unexported (golint)
    • Line 90: warning: exported function GetTaskCount should have comment or be unexported (golint)
    • Line 94: warning: exported function GetTaskDownloadSize should have comment or be unexported (golint)
    • Line 98: warning: exported function GetCompletionMessage should have comment or be unexported (golint)
    • Line 108: warning: exported function CreateDownloadJob should have comment or be unexported (golint)
    • Line 142: warning: exported function DoBarTransfer should have comment or be unexported (golint)
    • Line 153: warning: exported function CreateHeadlessJob should have comment or be unexported (golint)
    • Line 162: warning: exported type DownloadJobOptions should have comment or be unexported (golint)
    • Line 166: warning: exported function CreateDownloadJobOps should have comment or be unexported (golint)
    • go-util/types/multiplexfs.go
    • Line 9: warning: exported type MultiplexFileSystem should have comment or be unexported (golint)
    • Line 18: warning: exported method MultiplexFileSystem.Add should have comment or be unexported (golint)
    • Line 22: warning: exported method MultiplexFileSystem.Open should have comment or be unexported (golint)
    • go-util/mbpp/headlessbar.go
    • Line 9: warning: exported type HeadlessBar should have comment or be unexported (golint)
    • Line 15: warning: exported method HeadlessBar.Increment should have comment or be unexported (golint)
    • Line 30: warning: exported method HeadlessBar.AddToMax should have comment or be unexported (golint)
    • go-util/util/util.go
    • Line 20: warning: should not use dot imports (golint)
    • Line 23: warning: exported function Log should have comment or be unexported (golint)
    • Line 28: warning: exported function LogError should have comment or be unexported (golint)
    • Line 34: warning: exported function LogWarn should have comment or be unexported (golint)
    • Line 40: warning: exported function PrintTable should have comment or be unexported (golint)
    • Line 128: warning: exported function DieOnError should have comment or be unexported (golint)
    • Line 138: warning: exported function Assert should have comment or be unexported (golint)
    • Line 145: warning: exported function DoesFileExist should have comment or be unexported (golint)
    • Line 150: warning: exported function DoesDirectoryExist should have comment or be unexported (golint)
    • Line 161: warning: exported function ReadFile should have comment or be unexported (golint)
    • Line 167: warning: exported function ReadFileLines should have comment or be unexported (golint)
    • Line 176: warning: exported function CheckErr should have comment or be unexported (golint)
    • Line 183: warning: exported function FullHost should have comment or be unexported (golint)
    • Line 191: warning: exported function DoHttpRequest should have comment or be unexported (golint)
    • Line 198: warning: exported function IsPortAvailable should have comment or be unexported (golint)
    • Line 207: warning: exported function Btoi should have comment or be unexported (golint)
    • Line 214: warning: exported function ReduceNumber should have comment or be unexported (golint)
    • Line 226: warning: exported function ByteCountIEC should have comment or be unexported (golint)
    • Line 230: warning: exported function RunOnClose should have comment or be unexported (golint)
    • Line 243: warning: exported function TrimLen should have comment or be unexported (golint)
    • Line 250: warning: exported function FirstNonZero should have comment or be unexported (golint)
    • Line 259: warning: exported function FirstNonEmptyS should have comment or be unexported (golint)
    • Line 268: warning: exported function DoHttpFetch should have comment or be unexported (golint)
    • go-util/mbpp/bar.go
    • Line 10: warning: exported type BarProxy should have comment or be unexported (golint)
    • Line 31: warning: exported method BarProxy.AddToTotal should have comment or be unexported (golint)
    • Line 36: warning: exported method BarProxy.Increment should have comment or be unexported (golint)
    • Line 43: warning: exported method BarProxy.FinishNow should have comment or be unexported (golint)
    • Line 47: warning: exported method BarProxy.Wait should have comment or be unexported (golint)
    • go-util/util/hash.go
    • Line 48: warning: exported function Hash should have comment or be unexported (golint)
    • Line 58: warning: exported function HashStream should have comment or be unexported (golint)
    • go-util/ansi/color/color.go
    • Line 7: warning: exported function FgBlack should have comment or be unexported (golint)
    • Line 10: warning: exported function FgRed should have comment or be unexported (golint)
    • Line 13: warning: exported function FgGreen should have comment or be unexported (golint)
    • Line 16: warning: exported function FgYellow should have comment or be unexported (golint)
    • Line 19: warning: exported function FgBlue should have comment or be unexported (golint)
    • Line 22: warning: exported function FgMagenta should have comment or be unexported (golint)
    • Line 25: warning: exported function FgCyan should have comment or be unexported (golint)
    • Line 28: warning: exported function FgWhite should have comment or be unexported (golint)
    • Line 32: warning: exported function BgBlack should have comment or be unexported (golint)
    • Line 35: warning: exported function BgRed should have comment or be unexported (golint)
    • Line 38: warning: exported function BgGreen should have comment or be unexported (golint)
    • Line 41: warning: exported function BgYellow should have comment or be unexported (golint)
    • Line 44: warning: exported function BgBlue should have comment or be unexported (golint)
    • Line 47: warning: exported function BgMagenta should have comment or be unexported (golint)
    • Line 50: warning: exported function BgCyan should have comment or be unexported (golint)
    • Line 53: warning: exported function BgWhite 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!