Preparing report...

Report for github.com/breathbath/go_utils

A+    Excellent!    Found 44 issues across 95 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!


golint53%

Golint is a linter for Go source code.

    • go_utils/pkg/enc/hash.go
    • Line 16: warning: exported function Hash should have comment or be unexported (golint)
    • Line 26: warning: exported function Checksum should have comment or be unexported (golint)
    • Line 32: warning: exported function NewUUID should have comment or be unexported (golint)
    • Line 38: warning: exported function GetPasswordHash should have comment or be unexported (golint)
    • Line 44: warning: exported function CreateMd5Hash should have comment or be unexported (golint)
    • Line 53: warning: exported function ComputeHmac256Hex should have comment or be unexported (golint)
    • Line 65: warning: exported function ComputeHmac256Base64 should have comment or be unexported (golint)
    • go_utils/pkg/http/requestProcessor.go
    • Line 10: warning: exported const RequestTimeFormat should have comment or be unexported (golint)
    • Line 12: warning: exported function GetRequestValueString should have comment or be unexported (golint)
    • Line 21: warning: exported function GetRequestValueInt should have comment or be unexported (golint)
    • Line 35: warning: exported function GetRequestValueTimeWithError should have comment or be unexported (golint)
    • Line 49: warning: exported function GetRequestValueTime should have comment or be unexported (golint)
    • go_utils/pkg/http/urlBuilder.go
    • Line 10: warning: exported function BuildURL should have comment or be unexported (golint)
    • Line 22: warning: exported function JoinURL should have comment or be unexported (golint)
    • Line 34: warning: exported function GetValidURLFromEnvVar should have comment or be unexported (golint)
    • go_utils/pkg/config/parameterBag.go
    • Line 18: warning: exported type ValuesProvider should have comment or be unexported (golint)
    • Line 24: warning: exported type MapValuesProvider should have comment or be unexported (golint)
    • Line 28: warning: exported function NewMapValuesProvider should have comment or be unexported (golint)
    • Line 62: warning: exported method MapValuesProvider.ToKeyValues should have comment or be unexported (golint)
    • Line 66: warning: exported method MapValuesProvider.Dump should have comment or be unexported (golint)
    • Line 73: warning: exported type NullValuesProvider should have comment or be unexported (golint)
    • Line 79: warning: exported method NullValuesProvider.Dump should have comment or be unexported (golint)
    • Line 83: warning: exported method NullValuesProvider.ToKeyValues should have comment or be unexported (golint)
    • Line 87: warning: exported type EnvValuesProvider should have comment or be unexported (golint)
    • Line 93: warning: exported method EnvValuesProvider.Dump should have comment or be unexported (golint)
    • Line 100: warning: exported method EnvValuesProvider.ToKeyValues should have comment or be unexported (golint)
    • Line 110: warning: exported type JSONFileValuesProvider should have comment or be unexported (golint)
    • Line 114: warning: exported function NewJSONValuesProvider should have comment or be unexported (golint)
    • Line 166: warning: exported method JSONFileValuesProvider.Dump should have comment or be unexported (golint)
    • Line 170: warning: exported method JSONFileValuesProvider.ToKeyValues should have comment or be unexported (golint)
    • Line 174: warning: exported type ValuesProviderComposite should have comment or be unexported (golint)
    • Line 178: warning: exported function NewValuesProviderComposite should have comment or be unexported (golint)
    • Line 193: warning: exported method ValuesProviderComposite.ToKeyValues should have comment or be unexported (golint)
    • Line 205: warning: exported method ValuesProviderComposite.Dump should have comment or be unexported (golint)
    • Line 364: warning: comment on exported method ParameterBag.ReadInt64 should be of the form "ReadInt64 ..." (golint)
    • Line 383: warning: comment on exported method ParameterBag.ReadRequiredInt64 should be of the form "ReadRequiredInt64 ..." (golint)
    • Line 524: warning: exported method ParameterBag.MergeParameterBag should have comment or be unexported (golint)
    • go_utils/pkg/conv/mapConversions.go
    • Line 1: warning: package comment should be of the form "Package conv ..." (golint)
    • Line 31: warning: comment on exported function ConvertStructToSyncMapWithCallback should be of the form "ConvertStructToSyncMapWithCallback ..." (golint)
    • Line 80: warning: comment on exported function MapToSlices should be of the form "MapToSlices ..." (golint)
    • go_utils/pkg/types/nullFloat64.go
    • Line 10: warning: exported type NullFloat64 should have comment or be unexported (golint)
    • Line 14: warning: exported method NullFloat64.MarshalJSON should have comment or be unexported (golint)
    • Line 21: warning: exported method NullFloat64.UnmarshalJSON should have comment or be unexported (golint)
    • go_utils/pkg/types/nullDate.go
    • Line 9: warning: exported const NullableStr should have comment or be unexported (golint)
    • Line 10: warning: exported const EmptyStr should have comment or be unexported (golint)
    • Line 12: warning: exported type NullDate should have comment or be unexported (golint)
    • Line 16: warning: exported method NullDate.MarshalJSON should have comment or be unexported (golint)
    • Line 26: warning: exported method NullDate.UnmarshalJSON should have comment or be unexported (golint)
    • go_utils/pkg/types/nullTime.go
    • Line 10: warning: exported type NullTime should have comment or be unexported (golint)
    • Line 14: warning: exported method NullTime.MarshalJSON should have comment or be unexported (golint)
    • Line 21: warning: exported method NullTime.UnmarshalJSON should have comment or be unexported (golint)
    • go_utils/pkg/io/output.go
    • Line 14: warning: exported type Logger should have comment or be unexported (golint)
    • Line 18: warning: exported function SetLogger should have comment or be unexported (golint)
    • Line 23: warning: exported const SeverityError should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type DefaultLogger should have comment or be unexported (golint)
    • Line 30: warning: exported method DefaultLogger.OutputMessageType should have comment or be unexported (golint)
    • Line 77: warning: comment on exported function OutputInfo should be of the form "OutputInfo ..." (golint)
    • Line 95: warning: exported function GenerateMessage should have comment or be unexported (golint)
    • Line 117: warning: exported function RemoveLineBreaks should have comment or be unexported (golint)
    • Line 126: warning: exported function SetMaxMessageLength should have comment or be unexported (golint)
    • Line 130: warning: exported function CutMessageIfNeeded should have comment or be unexported (golint)
    • go_utils/pkg/conv/numbers.go
    • Line 8: warning: exported function ExtractIntFromString should have comment or be unexported (golint)
    • Line 20: warning: exported function ConvertFloatToLongStringNumber should have comment or be unexported (golint)
    • go_utils/pkg/fs/fileManager.go
    • Line 16: warning: exported const DS should have comment or be unexported (golint)
    • Line 18: warning: exported function GetCurrentPath should have comment or be unexported (golint)
    • Line 23: warning: exported function ReadFilesInDirectory should have comment or be unexported (golint)
    • Line 27: warning: exported function FileExistsOrFail should have comment or be unexported (golint)
    • Line 32: warning: exported function FileExists should have comment or be unexported (golint)
    • Line 37: warning: exported function MkDir should have comment or be unexported (golint)
    • Line 45: warning: exported function RmFile should have comment or be unexported (golint)
    • Line 54: warning: exported function JoinPath should have comment or be unexported (golint)
    • Line 58: warning: exported function RTrimDirPath should have comment or be unexported (golint)
    • Line 62: warning: exported function ReadTextFile should have comment or be unexported (golint)
    • Line 99: warning: exported function ReadFile should have comment or be unexported (golint)
    • Line 117: warning: exported function IsDirectory should have comment or be unexported (golint)
    • Line 126: warning: exported function TouchFile should have comment or be unexported (golint)
    • Line 131: warning: exported function WriteFileString should have comment or be unexported (golint)
    • Line 136: warning: exported function ReadFileString should have comment or be unexported (golint)
    • Line 141: warning: exported function ReadFileStringSecure should have comment or be unexported (golint)
    • Line 146: warning: exported function CopyFile should have comment or be unexported (golint)
    • go_utils/pkg/types/stringSet.go
    • Line 10: warning: exported type StringSet should have comment or be unexported (golint)
    • Line 12: warning: exported method StringSet.Add should have comment or be unexported (golint)
    • Line 16: warning: exported method StringSet.MarshalJSON should have comment or be unexported (golint)
    • Line 20: warning: exported method StringSet.ToStrings should have comment or be unexported (golint)
    • Line 24: warning: exported method StringSet.Contains should have comment or be unexported (golint)
    • Line 37: warning: exported method StringSet.UnmarshalJSON should have comment or be unexported (golint)
    • Line 44: warning: exported method StringSet.Scan should have comment or be unexported (golint)
    • Line 65: warning: exported method StringSet.Value should have comment or be unexported (golint)
    • go_utils/pkg/rest/jsonClient.go
    • Line 19: warning: exported type RequestContext should have comment or be unexported (golint)
    • Line 44: warning: exported type JSONClient should have comment or be unexported (golint)
    • Line 46: warning: exported function NewJSONClient should have comment or be unexported (golint)
    • Line 50: warning: exported method JSONClient.CallAPI should have comment or be unexported (golint)
    • Line 121: warning: exported method JSONClient.Get should have comment or be unexported (golint)
    • Line 126: warning: exported method JSONClient.Post should have comment or be unexported (golint)
    • Line 131: warning: exported method JSONClient.ScanToTarget should have comment or be unexported (golint)
    • Line 145: warning: exported method JSONClient.ScanToTargetRecoveringOnProxyFailure should have comment or be unexported (golint)
    • go_utils/pkg/env/reader.go
    • Line 11: warning: exported function ReadEnv should have comment or be unexported (golint)
    • Line 29: warning: exported function ReadEnvInt64 should have comment or be unexported (golint)
    • Line 43: warning: exported function ReadEnvInt should have comment or be unexported (golint)
    • Line 57: warning: exported function ReadEnvBool should have comment or be unexported (golint)
    • Line 67: warning: exported function ReadEnvFloat should have comment or be unexported (golint)
    • Line 81: warning: exported function ReadEnvOrError should have comment or be unexported (golint)
    • Line 90: warning: exported function ReadEnvOrFail should have comment or be unexported (golint)
    • go_utils/pkg/conv/db.go
    • Line 8: warning: exported const MysqlTimeFormat should have comment or be unexported (golint)
    • Line 10: warning: exported function ConvertFloat should have comment or be unexported (golint)
    • Line 19: warning: exported function ConvertInt should have comment or be unexported (golint)
    • Line 28: warning: exported function FormatTimePointer should have comment or be unexported (golint)
    • Line 36: warning: exported function ConvertBool should have comment or be unexported (golint)
    • Line 45: warning: exported function ConvertString should have comment or be unexported (golint)
    • go_utils/pkg/sqlDb/fakeDriver.go
    • Line 8: warning: exported type RowsData should have comment or be unexported (golint)
    • Line 15: warning: exported method RowsData.Columns should have comment or be unexported (golint)
    • Line 19: warning: exported method RowsData.Close should have comment or be unexported (golint)
    • Line 24: warning: exported method RowsData.Next should have comment or be unexported (golint)
    • Line 37: warning: exported type FakeStmt should have comment or be unexported (golint)
    • Line 44: warning: exported method FakeStmt.Close should have comment or be unexported (golint)
    • Line 48: warning: exported method FakeStmt.NumInput should have comment or be unexported (golint)
    • Line 52: warning: exported method FakeStmt.Exec should have comment or be unexported (golint)
    • Line 57: warning: exported method FakeStmt.Query should have comment or be unexported (golint)
    • Line 62: warning: exported type FakeConn should have comment or be unexported (golint)
    • Line 70: warning: exported method FakeConn.Prepare should have comment or be unexported (golint)
    • Line 75: warning: exported method FakeConn.Close should have comment or be unexported (golint)
    • Line 80: warning: exported method FakeConn.Begin should have comment or be unexported (golint)
    • Line 85: warning: exported type FakeFx should have comment or be unexported (golint)
    • Line 91: warning: exported method FakeFx.Commit should have comment or be unexported (golint)
    • Line 96: warning: exported method FakeFx.Rollback should have comment or be unexported (golint)
    • Line 101: warning: exported type FakeSQLDriver should have comment or be unexported (golint)
    • Line 107: warning: exported function NewFakeSQLDriver should have comment or be unexported (golint)
    • Line 140: warning: exported method FakeSQLDriver.Open should have comment or be unexported (golint)
    • go_utils/pkg/types/mockedStringEnumType.go
    • Line 9: warning: exported type Salutation should have comment or be unexported (golint)
    • Line 12: warning: exported const MS should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported var SalutationMap should have comment or be unexported (golint)
    • Line 29: warning: exported method Salutation.MarshalJSON should have comment or be unexported (golint)
    • Line 37: warning: exported method Salutation.UnmarshalJSON should have comment or be unexported (golint)
    • Line 42: warning: exported method Salutation.SetFromName should have comment or be unexported (golint)
    • Line 53: warning: exported method Salutation.Scan should have comment or be unexported (golint)
    • Line 63: warning: exported method Salutation.Value should have comment or be unexported (golint)
    • go_utils/pkg/types/nullInt64.go
    • Line 10: warning: exported type NullInt64 should have comment or be unexported (golint)
    • Line 14: warning: exported method NullInt64.MarshalJSON should have comment or be unexported (golint)
    • Line 21: warning: exported method NullInt64.UnmarshalJSON should have comment or be unexported (golint)
    • go_utils/pkg/types/stringNumber.go
    • Line 9: warning: exported type StringNumber should have comment or be unexported (golint)
    • Line 13: warning: exported method StringNumber.MarshalJSON should have comment or be unexported (golint)
    • Line 20: warning: exported method StringNumber.UnmarshalJSON should have comment or be unexported (golint)
    • go_utils/pkg/types/stringEnum.go
    • Line 8: warning: exported function ConvertEnumToString should have comment or be unexported (golint)
    • Line 18: warning: exported function ConvertStringToEnum should have comment or be unexported (golint)
    • Line 29: warning: exported function ConvertInterfaceToEnum should have comment or be unexported (golint)
    • Line 44: warning: exported function GenerateEnumQueryPart should have comment or be unexported (golint)
    • go_utils/pkg/time/timestamps.go
    • Line 5: warning: exported function GetUnixTimestampMilliseconds should have comment or be unexported (golint)
    • Line 9: warning: exported function GetTimeFromTimestampMilliseconds should have comment or be unexported (golint)
    • go_utils/pkg/errs/collector.go
    • Line 9: warning: exported function CollectErrors should have comment or be unexported (golint)
    • Line 30: warning: exported function WrapError should have comment or be unexported (golint)
    • Line 38: warning: exported function AppendError should have comment or be unexported (golint)
    • Line 44: warning: exported type ErrorContainer should have comment or be unexported (golint)
    • Line 48: warning: exported function NewErrorContainer should have comment or be unexported (golint)
    • Line 54: warning: exported method ErrorContainer.AddError should have comment or be unexported (golint)
    • Line 58: warning: exported method ErrorContainer.Result should have comment or be unexported (golint)
    • Line 62: warning: exported method ErrorContainer.AddErrorF should have comment or be unexported (golint)
    • go_utils/pkg/errs/handler.go
    • Line 8: warning: exported function FailOnError should have comment or be unexported (golint)
    • Line 14: warning: exported function FailOnErrorF should have comment or be unexported (golint)
    • go_utils/pkg/sqlDb/dbGateway.go
    • Line 16: warning: exported function NewDBGateway should have comment or be unexported (golint)
    • Line 96: warning: exported method Gateway.FindOneStructByID should have comment or be unexported (golint)
    • go_utils/pkg/types/nullDecimal.go
    • Line 8: warning: exported type NullDecimal should have comment or be unexported (golint)
    • Line 13: warning: exported method NullDecimal.MarshalJSON should have comment or be unexported (golint)
    • Line 20: warning: exported method NullDecimal.Scan should have comment or be unexported (golint)
    • Line 42: warning: exported method NullDecimal.Value should have comment or be unexported (golint)
    • Line 49: warning: exported method NullDecimal.UnmarshalJSON should have comment or be unexported (golint)
    • go_utils/pkg/types/nullString.go
    • Line 9: warning: exported type NullString should have comment or be unexported (golint)
    • Line 13: warning: exported method NullString.MarshalJSON should have comment or be unexported (golint)
    • Line 20: warning: exported method NullString.UnmarshalJSON should have comment or be unexported (golint)
    • go_utils/pkg/time/generators.go
    • Line 5: warning: exported function GetDateAtDayStart should have comment or be unexported (golint)
    • Line 9: warning: exported function GetDateAtDayEnd should have comment or be unexported (golint)
    • go_utils/pkg/math/functions.go
    • Line 11: warning: exported const DefaultRoundingBase should have comment or be unexported (golint)
    • Line 12: warning: exported const DefaultRoundingPlaces should have comment or be unexported (golint)
    • Line 14: warning: exported function Round should have comment or be unexported (golint)
    • Line 19: warning: exported function CountDecimalPlaces should have comment or be unexported (golint)
    • Line 28: warning: exported function CountDigits should have comment or be unexported (golint)
    • go_utils/pkg/types/decimal.go
    • Line 11: warning: exported var ZERO should have comment or be unexported (golint)
    • Line 18: warning: exported type Decimal should have comment or be unexported (golint)
    • Line 22: warning: exported function NewDecimalFromString should have comment or be unexported (golint)
    • Line 31: warning: exported function NewDecimalFromFloat should have comment or be unexported (golint)
    • Line 37: warning: exported function NewDecimalFromInt should have comment or be unexported (golint)
    • Line 50: warning: exported method Decimal.Add should have comment or be unexported (golint)
    • Line 55: warning: exported method Decimal.Sub should have comment or be unexported (golint)
    • Line 60: warning: exported method Decimal.Div should have comment or be unexported (golint)
    • Line 65: warning: exported method Decimal.Mul should have comment or be unexported (golint)
    • Line 70: warning: exported method Decimal.CeilToValue should have comment or be unexported (golint)
    • Line 80: warning: exported method Decimal.FloorToValue should have comment or be unexported (golint)
    • Line 90: warning: exported method Decimal.Floor should have comment or be unexported (golint)
    • Line 94: warning: exported method Decimal.MarshalJSON should have comment or be unexported (golint)
    • Line 98: warning: exported method Decimal.UnmarshalJSON should have comment or be unexported (golint)
    • Line 132: warning: exported method Decimal.LessOrEqual should have comment or be unexported (golint)
    • Line 136: warning: exported method Decimal.Equal should have comment or be unexported (golint)
    • Line 140: warning: exported method Decimal.GreaterOrEqual should have comment or be unexported (golint)
    • Line 144: warning: exported method Decimal.Less should have comment or be unexported (golint)
    • Line 148: warning: exported method Decimal.Greater should have comment or be unexported (golint)
    • Line 152: warning: exported method Decimal.LessOrEqualZero should have comment or be unexported (golint)
    • Line 156: warning: exported method Decimal.GreaterOrEqualZero should have comment or be unexported (golint)
    • Line 160: warning: exported method Decimal.EqualZero should have comment or be unexported (golint)
    • Line 164: warning: exported method Decimal.LessZero should have comment or be unexported (golint)
    • Line 168: warning: exported method Decimal.GreaterZero should have comment or be unexported (golint)
    • Line 172: warning: exported method Decimal.IncrementByPercent should have comment or be unexported (golint)
    • Line 177: warning: exported method Decimal.DecrementByPercent should have comment or be unexported (golint)
    • Line 182: warning: exported method Decimal.EqualInt should have comment or be unexported (golint)
    • Line 187: warning: exported method Decimal.GreaterInt should have comment or be unexported (golint)
    • Line 192: warning: exported method Decimal.LowerOrEqualInt should have comment or be unexported (golint)
    • Line 197: warning: exported method Decimal.GreaterOrEqualInt should have comment or be unexported (golint)
    • Line 202: warning: exported method Decimal.Round should have comment or be unexported (golint)
    • Line 211: warning: exported method Decimal.ToPercent should have comment or be unexported (golint)
    • Line 216: warning: exported method Decimal.ToFloat 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!