Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
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!
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!
Golint is a linter for Go source code.
-
random/random.go
- Line 1: warning: package comment should be of the form "Package random ..." (golint)
- Line 24: warning: exported method Random.Bytes should have comment or be unexported (golint)
- Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 27: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 32: warning: exported method Random.Base64 should have comment or be unexported (golint)
- Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 35: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 40: warning: exported method Random.Base62 should have comment or be unexported (golint)
- Line 40: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 48: warning: exported method Random.Uint32 should have comment or be unexported (golint)
- Line 48: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 57: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 62: warning: exported method Random.Hex should have comment or be unexported (golint)
- Line 62: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 70: warning: exported method Random.GUID should have comment or be unexported (golint)
- Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 73: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 78: warning: exported method Random.GUIDString should have comment or be unexported (golint)
- Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 81: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 91: warning: exported function Bytes should have comment or be unexported (golint)
- Line 96: warning: exported function Base64 should have comment or be unexported (golint)
- Line 100: warning: exported function Uint32 should have comment or be unexported (golint)
- Line 103: 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 117: warning: exported function Hex should have comment or be unexported (golint)
- Line 121: warning: exported function GUID should have comment or be unexported (golint)
- Line 122: warning: exported function GUIDString should have comment or be unexported (golint)
-
random/random_test.go
- Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 49: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
- Line 59: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!