Preparing report...

Report for github.com/yunionio/pkg

A+    Excellent!    Found 75 issues across 146 files

Tweet

gofmt94%

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!


gocyclo91%

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.

    • pkg/util/clock/clock_test.go
    • Line 106: warning: cyclomatic complexity 23 of function TestFakeTick() is high (> 15) (gocyclo)
    • Line 48: warning: cyclomatic complexity 19 of function TestFakeAfter() is high (> 15) (gocyclo)
    • pkg/util/reflectutils/jsonfield.go
    • Line 208: warning: cyclomatic complexity 20 of function fetchStructFieldValueSet2() is high (> 15) (gocyclo)
    • Line 79: warning: cyclomatic complexity 17 of function ParseFieldJsonInfo() is high (> 15) (gocyclo)
    • pkg/gotypes/deepcopy_test.go
    • Line 216: warning: cyclomatic complexity 95 of function TestMostTypes() is high (> 15) (gocyclo)
    • Line 711: warning: cyclomatic complexity 37 of function TestStructA() is high (> 15) (gocyclo)
    • Line 953: warning: cyclomatic complexity 36 of function TestIssue9() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 29 of function TestSimple() is high (> 15) (gocyclo)
    • Line 620: warning: cyclomatic complexity 16 of function TestComplexSlices() is high (> 15) (gocyclo)
    • pkg/util/secrules/secrules.go
    • Line 326: warning: cyclomatic complexity 24 of function (*SecurityRule).ValidateRule() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 22 of function (SecurityRule).protoRelation() is high (> 15) (gocyclo)
    • Line 121: warning: cyclomatic complexity 20 of function ParseSecurityRule() is high (> 15) (gocyclo)
    • pkg/gotypes/gotypes.go
    • Line 96: warning: cyclomatic complexity 24 of function ParseValue() is high (> 15) (gocyclo)
    • Line 198: warning: cyclomatic complexity 16 of function SliceBaseType() is high (> 15) (gocyclo)
    • pkg/util/secrules/port_test.go
    • Line 81: warning: cyclomatic complexity 34 of function TestPortRange() is high (> 15) (gocyclo)
    • Line 21: warning: cyclomatic complexity 19 of function TestPorts() is high (> 15) (gocyclo)
    • pkg/utils/misc.go
    • Line 331: warning: cyclomatic complexity 19 of function ToInt64E() is high (> 15) (gocyclo)
    • Line 390: warning: cyclomatic complexity 18 of function ToFloat64E() is high (> 15) (gocyclo)

golint56%

Golint is a linter for Go source code.

    • pkg/utils/utils.go
    • Line 34: warning: exported function CamelSplit should have comment or be unexported (golint)
    • Line 39: warning: exported function CamelSplitTokens should have comment or be unexported (golint)
    • Line 80: warning: exported function Capitalize should have comment or be unexported (golint)
    • Line 83: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 88: warning: exported function Kebab2Camel should have comment or be unexported (golint)
    • Line 97: warning: exported var TRUE_STRS should have comment or be unexported (golint)
    • Line 99: warning: exported function ToBool should have comment or be unexported (golint)
    • Line 109: warning: exported function DecodeMeta should have comment or be unexported (golint)
    • Line 113: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 118: warning: exported function IsInStringArray should have comment or be unexported (golint)
    • Line 127: warning: exported function InStringArray should have comment or be unexported (golint)
    • Line 136: warning: exported function InArray should have comment or be unexported (golint)
    • Line 149: warning: exported function TruncateString should have comment or be unexported (golint)
    • Line 157: warning: exported function IsAscii should have comment or be unexported (golint)
    • Line 166: warning: exported function FloatRound should have comment or be unexported (golint)
    • Line 188: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 199: warning: exported function ArgsStringToArray should have comment or be unexported (golint)
    • pkg/util/errors/http_error.go
    • Line 26: warning: exported type HttpError should have comment or be unexported (golint)
    • Line 35: warning: exported function NewHttpError should have comment or be unexported (golint)
    • Line 46: warning: exported function HandleHttpError should have comment or be unexported (golint)
    • pkg/util/compare/compare.go
    • Line 72: warning: exported type SCompareSet should have comment or be unexported (golint)
    • Line 79: warning: exported function CompareSetsFunc should have comment or be unexported (golint)
    • Line 148: warning: exported function CompareSets should have comment or be unexported (golint)
    • pkg/gotypes/deepcopy.go
    • Line 21: warning: exported type IDeepCopy should have comment or be unexported (golint)
    • Line 25: warning: exported type DeepCopyFlags should have comment or be unexported (golint)
    • Line 41: warning: exported function DeepCopyRv should have comment or be unexported (golint)
    • pkg/gotypes/gotypes.go
    • Line 29: warning: exported const EMPTYSTR should have comment (or a comment on this block) or be unexported (golint)
    • Line 65: warning: exported var BoolType should have comment or be unexported (golint)
    • Line 96: warning: exported function ParseValue should have comment or be unexported (golint)
    • Line 99: warning: don't use underscores in Go names; var val_bool should be valBool (golint)
    • Line 102: warning: don't use underscores in Go names; var val_int should be valInt (golint)
    • Line 116: warning: don't use underscores in Go names; var val_uint should be valUint (golint)
    • Line 130: warning: don't use underscores in Go names; var val_float should be valFloat (golint)
    • Line 133: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 164: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 170: warning: exported function SetValue should have comment or be unexported (golint)
    • Line 187: warning: exported function AppendValues should have comment or be unexported (golint)
    • Line 198: warning: exported function SliceBaseType should have comment or be unexported (golint)
    • Line 233: warning: exported function AppendValue should have comment or be unexported (golint)
    • Line 238: warning: don't use underscores in Go names; var val_raw should be valRaw (golint)
    • Line 246: warning: exported function InCollection should have comment or be unexported (golint)
    • Line 268: warning: exported function IsFieldExportable should have comment or be unexported (golint)
    • Line 272: warning: exported function IsNil should have comment or be unexported (golint)
    • Line 285: warning: exported function GetInstanceTypeName should have comment or be unexported (golint)
    • Line 291: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 296: warning: comment on exported function ConvertSliceElemType should be of the form "ConvertSliceElemType ..." (golint)
    • pkg/util/version/version.go
    • Line 64: warning: exported function GetJsonString should have comment or be unexported (golint)
    • Line 86: warning: exported function GetShortString should have comment or be unexported (golint)
    • pkg/utils/crypt.go
    • Line 93: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 131: warning: exported function DescryptAESBase64 should have comment or be unexported (golint)
    • Line 144: warning: exported function DescryptAESBase64Url should have comment or be unexported (golint)
    • Line 157: warning: exported function EncryptAESBase64 should have comment or be unexported (golint)
    • Line 166: warning: exported function EncryptAESBase64Url should have comment or be unexported (golint)
    • Line 189: warning: comment on exported function RsaEncryptBase64 should be of the form "RsaEncryptBase64 ..." (golint)
    • Line 214: warning: comment on exported function RsaDecryptBase64 should be of the form "RsaDecryptBase64 ..." (golint)
    • Line 229: warning: comment on exported function RsaSign should be of the form "RsaSign ..." (golint)
    • Line 247: warning: comment on exported function RsaUnsign should be of the form "RsaUnsign ..." (golint)
    • pkg/tristate/tristate.go
    • Line 19: warning: exported type TriState should have comment or be unexported (golint)
    • Line 22: warning: exported const True should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported var TriStateType should have comment or be unexported (golint)
    • Line 34: warning: exported method TriState.Bool should have comment or be unexported (golint)
    • Line 49: warning: exported method TriState.IsNone should have comment or be unexported (golint)
    • Line 53: warning: exported method TriState.IsTrue should have comment or be unexported (golint)
    • Line 57: warning: exported method TriState.IsFalse should have comment or be unexported (golint)
    • Line 61: warning: exported function NewFromBool should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pkg/errors/consts.go
    • Line 4: warning: exported const ErrServer should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: comment on exported const ErrDNS should be of the form "ErrDNS ..." (golint)
    • pkg/util/compare/syncresults.go
    • Line 22: warning: exported type SyncResult 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 39: warning: exported method SyncResult.Add should have comment or be unexported (golint)
    • Line 39: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: exported method SyncResult.AddError should have comment or be unexported (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 48: warning: exported method SyncResult.Update 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 52: warning: exported method SyncResult.UpdateError should have comment or be unexported (golint)
    • Line 52: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 57: warning: exported method SyncResult.Delete should have comment or be unexported (golint)
    • Line 57: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 61: warning: exported method SyncResult.DeleteError should have comment or be unexported (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 66: warning: exported method SyncResult.AllError should have comment or be unexported (golint)
    • Line 66: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 81: warning: exported method SyncResult.IsError should have comment or be unexported (golint)
    • Line 81: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 85: warning: exported method SyncResult.Result should have comment or be unexported (golint)
    • Line 85: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • pkg/util/sets/int.go
    • Line 40: warning: comment on exported type Int should be of the form "Int ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported function NewInt should be of the form "NewInt ..." (golint)
    • Line 124: warning: receiver name s1 should be consistent with previous receiver name s for Int (golint)
    • Line 140: warning: receiver name s1 should be consistent with previous receiver name s for Int (golint)
    • Line 159: warning: receiver name s1 should be consistent with previous receiver name s for Int (golint)
    • Line 171: warning: receiver name s1 should be consistent with previous receiver name s for Int (golint)
    • Line 200: warning: comment on exported method Int.PopAny should be of the form "PopAny ..." (golint)
    • pkg/utils/net.go
    • Line 23: warning: exported function GetOutboundIP should have comment or be unexported (golint)
    • Line 33: warning: exported function GetAddrPort should have comment or be unexported (golint)
    • pkg/gotypes/serialize.go
    • Line 22: warning: exported type ISerializable should have comment or be unexported (golint)
    • Line 29: warning: exported type FuncSerializableAllocator should have comment or be unexported (golint)
    • Line 31: warning: exported type FuncSerializableTransformer should have comment or be unexported (golint)
    • Line 34: warning: exported var ISerializableType should have comment or be unexported (golint)
    • Line 55: warning: exported function RegisterSerializableTransformer should have comment or be unexported (golint)
    • Line 65: warning: exported function IsSerializable should have comment or be unexported (golint)
    • Line 69: warning: exported function NewSerializable should have comment or be unexported (golint)
    • Line 78: warning: exported function Transform should have comment or be unexported (golint)
    • pkg/utils/wait_group.go
    • Line 22: warning: exported type WaitGroupWrapper should have comment or be unexported (golint)
    • Line 26: warning: exported method WaitGroupWrapper.Wrap should have comment or be unexported (golint)
    • Line 34: warning: exported function WaitTimeOut should have comment or be unexported (golint)
    • pkg/util/secrules/secruleset_test.go
    • Line 54: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • Line 64: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • Line 79: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • Line 113: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • Line 127: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • Line 141: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • Line 155: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • Line 167: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • Line 178: warning: don't use underscores in Go names; var srs1_ should be srs1 (golint)
    • pkg/trace/trace.go
    • Line 27: warning: exported type TraceKind should have comment or be unexported (golint)
    • Line 29: warning: exported const UNKNOWN_SERVICE_NAME should have comment or be unexported (golint)
    • Line 32: warning: exported const X_YUNION_PEER_SERVICE_NAME should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: comment on exported const X_YUNION_TRACE_ID should be of the form "X_YUNION_TRACE_ID ..." (golint)
    • Line 44: warning: exported const TRACE_KIND_CLIENT should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported type STraceEndpoint should have comment or be unexported (golint)
    • Line 54: warning: exported type STrace should have comment or be unexported (golint)
    • Line 70: warning: exported method STrace.IsZero should have comment or be unexported (golint)
    • Line 79: warning: exported function StartServerTrace should have comment or be unexported (golint)
    • Line 158: warning: exported method STrace.EndTrace should have comment or be unexported (golint)
    • Line 163: warning: exported function StartClientTrace should have comment or be unexported (golint)
    • Line 203: warning: exported method STrace.EndClientTraceHeader should have comment or be unexported (golint)
    • Line 218: warning: exported method STrace.EndClientTrace should have comment or be unexported (golint)
    • Line 242: warning: exported method STrace.AddClientRequestHeader should have comment or be unexported (golint)
    • Line 254: warning: exported function SubmitTrace should have comment or be unexported (golint)
    • pkg/util/ttlpool/pool.go
    • Line 26: warning: exported type Item should have comment or be unexported (golint)
    • Line 38: warning: exported type TTLPool should have comment or be unexported (golint)
    • Line 42: warning: exported function NewTTLPool should have comment or be unexported (golint)
    • Line 48: warning: exported method TTLPool.Add should have comment or be unexported (golint)
    • Line 52: warning: exported method TTLPool.Delete should have comment or be unexported (golint)
    • Line 56: warning: exported method TTLPool.DeleteByKey should have comment or be unexported (golint)
    • Line 60: warning: exported method TTLPool.Get should have comment or be unexported (golint)
    • Line 64: warning: exported method TTLPool.GetByKey should have comment or be unexported (golint)
    • Line 68: warning: exported method TTLPool.Has should have comment or be unexported (golint)
    • Line 76: warning: exported method TTLPool.HasByKey should have comment or be unexported (golint)
    • Line 84: warning: exported method TTLPool.List should have comment or be unexported (golint)
    • Line 92: warning: exported type CountPool should have comment or be unexported (golint)
    • Line 97: warning: exported function NewCountPool should have comment or be unexported (golint)
    • Line 109: warning: exported method CountPool.Add should have comment or be unexported (golint)
    • Line 122: warning: exported method CountPool.DeleteByKey should have comment or be unexported (golint)
    • Line 138: warning: exported method CountPool.Delete should have comment or be unexported (golint)
    • Line 146: warning: exported method CountPool.GetCount should have comment or be unexported (golint)
    • Line 155: warning: exported method CountPool.GetCountByKey should have comment or be unexported (golint)
    • Line 164: warning: exported method CountPool.GetByKey should have comment or be unexported (golint)
    • Line 176: warning: exported method CountPool.Get should have comment or be unexported (golint)
    • Line 184: warning: exported method CountPool.Has should have comment or be unexported (golint)
    • Line 188: warning: exported method CountPool.HasByKey should have comment or be unexported (golint)
    • pkg/util/netutils/netutils.go
    • Line 32: warning: exported function FormatMacAddr should have comment or be unexported (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 53: warning: exported function IP2Number should have comment or be unexported (golint)
    • Line 88: warning: exported function Number2Bytes should have comment or be unexported (golint)
    • Line 98: warning: exported function Number2IP should have comment or be unexported (golint)
    • Line 103: warning: exported type IPV4Addr should have comment or be unexported (golint)
    • Line 105: warning: exported function NewIPV4Addr should have comment or be unexported (golint)
    • Line 117: warning: exported method IPV4Addr.StepDown should have comment or be unexported (golint)
    • Line 122: warning: exported method IPV4Addr.StepUp should have comment or be unexported (golint)
    • Line 127: warning: exported method IPV4Addr.NetAddr should have comment or be unexported (golint)
    • Line 132: warning: exported method IPV4Addr.BroadcastAddr should have comment or be unexported (golint)
    • Line 137: warning: exported method IPV4Addr.CliAddr should have comment or be unexported (golint)
    • Line 146: warning: exported method IPV4Addr.ToBytes should have comment or be unexported (golint)
    • Line 154: warning: exported method IPV4Addr.ToMac should have comment or be unexported (golint)
    • Line 159: warning: exported type IPV4AddrRange should have comment or be unexported (golint)
    • Line 164: warning: exported function NewIPV4AddrRange should have comment or be unexported (golint)
    • Line 167: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 172: warning: comment on exported function NewIPV4AddrRangeFromIPNet should be of the form "NewIPV4AddrRangeFromIPNet ..." (golint)
    • Line 181: warning: exported method IPV4AddrRange.Contains should have comment or be unexported (golint)
    • Line 185: warning: exported method IPV4AddrRange.ContainsRange should have comment or be unexported (golint)
    • Line 189: warning: exported method IPV4AddrRange.Random should have comment or be unexported (golint)
    • Line 193: warning: exported method IPV4AddrRange.AddressCount should have comment or be unexported (golint)
    • Line 201: warning: exported method IPV4AddrRange.StartIp should have comment or be unexported (golint)
    • Line 205: warning: exported method IPV4AddrRange.EndIp should have comment or be unexported (golint)
    • Line 209: warning: exported method IPV4AddrRange.Merge should have comment or be unexported (golint)
    • Line 222: warning: exported method IPV4AddrRange.IsOverlap should have comment or be unexported (golint)
    • Line 225: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 230: warning: exported method IPV4AddrRange.ToIPNets should have comment or be unexported (golint)
    • Line 246: warning: exported method IPV4AddrRange.ToMaskMatches should have comment or be unexported (golint)
    • Line 268: warning: exported method IPV4AddrRange.Substract should have comment or be unexported (golint)
    • Line 287: warning: don't use underscores in Go names; var ar2_ should be ar2 (golint)
    • Line 294: warning: don't use underscores in Go names; var ar_ should be ar (golint)
    • Line 302: warning: don't use underscores in Go names; var sub_ should be sub (golint)
    • Line 310: warning: don't use underscores in Go names; var sub_ should be sub (golint)
    • Line 323: warning: exported function Masklen2Mask should have comment or be unexported (golint)
    • Line 330: warning: exported type IPV4Prefix should have comment or be unexported (golint)
    • Line 339: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 344: warning: exported method IPV4Prefix.Equals should have comment or be unexported (golint)
    • Line 351: warning: exported function Mask2Len should have comment or be unexported (golint)
    • Line 355: warning: exported function ParsePrefix should have comment or be unexported (golint)
    • Line 369: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 388: warning: exported function NewIPV4Prefix should have comment or be unexported (golint)
    • Line 401: warning: exported method IPV4Prefix.ToIPRange should have comment or be unexported (golint)
    • Line 401: warning: receiver name prefix should be consistent with previous receiver name pref for IPV4Prefix (golint)
    • Line 407: warning: exported method IPV4Prefix.Contains should have comment or be unexported (golint)
    • Line 407: warning: receiver name prefix should be consistent with previous receiver name pref for IPV4Prefix (golint)
    • Line 453: warning: exported function SetPrivatePrefixes should have comment or be unexported (golint)
    • Line 457: warning: exported function GetPrivateIPRanges should have comment or be unexported (golint)
    • Line 461: warning: exported function IsPrivate should have comment or be unexported (golint)
    • Line 470: warning: exported function IsHostLocal should have comment or be unexported (golint)
    • Line 474: warning: exported function IsLinkLocal should have comment or be unexported (golint)
    • Line 478: warning: exported function IsMulticast should have comment or be unexported (golint)
    • Line 482: warning: exported function IsExitAddress should have comment or be unexported (golint)
    • Line 486: warning: exported function MacUnpackHex should have comment or be unexported (golint)
    • pkg/util/wait/wait.go
    • Line 25: warning: comment on exported var ForeverTestTimeout should be of the form "ForeverTestTimeout ..." (golint)
    • pkg/util/fileutils/filesize.go
    • Line 52: warning: exported function GetSizeGb should have comment or be unexported (golint)
    • Line 57: warning: exported function GetSizeMb should have comment or be unexported (golint)
    • Line 62: warning: exported function GetSizeKb should have comment or be unexported (golint)
    • pkg/util/signalutils/signalutils.go
    • Line 26: warning: exported type SSignalManager should have comment or be unexported (golint)
    • Line 35: warning: exported type Trap should have comment or be unexported (golint)
    • Line 37: warning: exported function RegisterSignal should have comment or be unexported (golint)
    • Line 52: warning: exported function StartTrap should have comment or be unexported (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 58: warning: should omit 2nd value from range; this loop is equivalent to `for sig := range ...` (golint)
    • pkg/util/secrules/secrules.go
    • Line 29: warning: exported type TSecurityRuleDirection should have comment or be unexported (golint)
    • Line 32: warning: exported const SecurityRuleIngress should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported type TSecurityRuleAction should have comment or be unexported (golint)
    • Line 39: warning: exported const SecurityRuleAllow should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported type TSecurityRuleRelation should have comment or be unexported (golint)
    • Line 46: warning: exported const RELATION_INDEPENDENT should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported type SecurityRule should have comment or be unexported (golint)
    • Line 68: warning: exported const DIR_IN should have comment (or a comment on this block) or be unexported (golint)
    • Line 71: warning: exported const SEG_ACTION should have comment or be unexported (golint)
    • Line 72: warning: exported const SEG_IP should have comment or be unexported (golint)
    • Line 73: warning: exported const SEG_PROTO should have comment or be unexported (golint)
    • Line 74: warning: exported const SEG_PORT should have comment or be unexported (golint)
    • Line 75: warning: exported const SEG_END should have comment or be unexported (golint)
    • Line 77: warning: comment on exported const PROTO_ANY should be of the form "PROTO_ANY ..." (golint)
    • Line 80: warning: exported const PROTO_TCP should have comment or be unexported (golint)
    • Line 81: warning: exported const PROTO_UDP should have comment or be unexported (golint)
    • Line 82: warning: exported const PROTO_ICMP should have comment or be unexported (golint)
    • Line 92: warning: exported var ErrInvalidProtocolAny should have comment or be unexported (golint)
    • Line 112: warning: exported function MustParseSecurityRule should have comment or be unexported (golint)
    • Line 121: warning: exported function ParseSecurityRule should have comment or be unexported (golint)
    • Line 178: warning: exported method SecurityRule.ParseCIDR should have comment or be unexported (golint)
    • Line 197: warning: exported method SecurityRule.IsWildMatch should have comment or be unexported (golint)
    • Line 284: warning: exported method SecurityRule.ParsePorts should have comment or be unexported (golint)
    • Line 326: warning: exported method SecurityRule.ValidateRule should have comment or be unexported (golint)
    • Line 374: warning: exported method SecurityRule.GetPortsString should have comment or be unexported (golint)
    • pkg/util/fifoutils/fifoutils.go
    • Line 23: warning: exported var ErrEmpty should have comment or be unexported (golint)
    • Line 29: warning: exported type FIFO should have comment or be unexported (golint)
    • Line 34: warning: exported function NewFIFO should have comment or be unexported (golint)
    • Line 39: warning: exported method FIFO.Push should have comment or be unexported (golint)
    • Line 48: warning: exported method FIFO.Pop should have comment or be unexported (golint)
    • Line 61: warning: exported method FIFO.Len should have comment or be unexported (golint)
    • Line 65: warning: exported method FIFO.ElementAt should have comment or be unexported (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pkg/util/seclib/seclib.go
    • Line 25: warning: exported const DIGITS should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported var CHARS should have comment or be unexported (golint)
    • Line 32: warning: exported function RandomPassword should have comment or be unexported (golint)
    • pkg/util/sets/string.go
    • Line 40: warning: comment on exported type String should be of the form "String ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported function NewString should be of the form "NewString ..." (golint)
    • Line 124: warning: receiver name s1 should be consistent with previous receiver name s for String (golint)
    • Line 140: warning: receiver name s1 should be consistent with previous receiver name s for String (golint)
    • Line 159: warning: receiver name s1 should be consistent with previous receiver name s for String (golint)
    • Line 171: warning: receiver name s1 should be consistent with previous receiver name s for String (golint)
    • Line 200: warning: comment on exported method String.PopAny should be of the form "PopAny ..." (golint)
    • Line 219: warning: comment on exported function InArray should be of the form "InArray ..." (golint)
    • pkg/sortedmap/iterator.go
    • Line 17: warning: exported type SSortedMapIterator should have comment or be unexported (golint)
    • Line 22: warning: exported method SSortedMapIterator.Init should have comment or be unexported (golint)
    • Line 27: warning: exported method SSortedMapIterator.HasMore should have comment or be unexported (golint)
    • Line 31: warning: exported method SSortedMapIterator.Next should have comment or be unexported (golint)
    • Line 35: warning: exported method SSortedMapIterator.Get should have comment or be unexported (golint)
    • Line 39: warning: exported function NewIterator should have comment or be unexported (golint)
    • pkg/util/cache/fifo.go
    • Line 35: warning: error var FIFOClosedError should have name of the form ErrFoo (golint)
    • Line 35: warning: exported var FIFOClosedError should have comment or be unexported (golint)
    • Line 67: warning: comment on exported function Pop should be of the form "Pop ..." (golint)
    • Line 127: warning: comment on exported method FIFO.HasSynced should be of the form "HasSynced ..." (golint)
    • Line 243: warning: comment on exported method FIFO.IsClosed should be of the form "IsClosed ..." (golint)
    • pkg/util/sets/int64.go
    • Line 40: warning: comment on exported type Int64 should be of the form "Int64 ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported function NewInt64 should be of the form "NewInt64 ..." (golint)
    • Line 124: warning: receiver name s1 should be consistent with previous receiver name s for Int64 (golint)
    • Line 140: warning: receiver name s1 should be consistent with previous receiver name s for Int64 (golint)
    • Line 159: warning: receiver name s1 should be consistent with previous receiver name s for Int64 (golint)
    • Line 171: warning: receiver name s1 should be consistent with previous receiver name s for Int64 (golint)
    • Line 200: warning: comment on exported method Int64.PopAny should be of the form "PopAny ..." (golint)
    • pkg/utils/tags.go
    • Line 25: warning: exported const EMPTYSTR should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported function Unquote should have comment or be unexported (golint)
    • Line 100: warning: exported function FindWords should have comment or be unexported (golint)
    • Line 119: warning: exported function TagMap should have comment or be unexported (golint)
    • Line 144: warning: exported function TagPop should have comment or be unexported (golint)
    • Line 152: warning: exported function SplitCSV should have comment or be unexported (golint)
    • pkg/utils/misc.go
    • Line 31: warning: exported function ToDict should have comment or be unexported (golint)
    • Line 48: warning: exported function GroupBy should have comment or be unexported (golint)
    • Line 70: warning: exported function SelectDistinct should have comment or be unexported (golint)
    • Line 88: warning: exported function SubDict should have comment or be unexported (golint)
    • Line 101: warning: exported type StatItem2 should have comment or be unexported (golint)
    • Line 106: warning: exported type StatItem3 should have comment or be unexported (golint)
    • Line 112: warning: exported function ToStatDict2 should have comment or be unexported (golint)
    • Line 123: warning: exported function ToStatDict3 should have comment or be unexported (golint)
    • Line 139: warning: exported function ConvertError should have comment or be unexported (golint)
    • Line 143: warning: exported function HasPrefix should have comment or be unexported (golint)
    • Line 147: warning: exported function HasSuffix should have comment or be unexported (golint)
    • Line 151: warning: exported function IsMatch should have comment or be unexported (golint)
    • Line 156: warning: exported function IsMatchIP4 should have comment or be unexported (golint)
    • Line 160: warning: exported function IsMatchIP6 should have comment or be unexported (golint)
    • Line 164: warning: exported function IsMatchCompactMacAddr should have comment or be unexported (golint)
    • Line 168: warning: exported function IsMatchMacAddr should have comment or be unexported (golint)
    • Line 172: warning: exported function IsMatchSize should have comment or be unexported (golint)
    • Line 176: warning: exported function IsMatchUUID should have comment or be unexported (golint)
    • Line 180: warning: exported function IsMatchInteger should have comment or be unexported (golint)
    • Line 184: warning: exported function IsMatchFloat should have comment or be unexported (golint)
    • Line 188: warning: exported function Max should have comment or be unexported (golint)
    • Line 196: warning: exported function Min should have comment or be unexported (golint)
    • Line 204: warning: don't use underscores in Go names; type Pred_t should be PredT (golint)
    • Line 204: warning: exported type Pred_t should have comment or be unexported (golint)
    • Line 206: warning: exported function Any should have comment or be unexported (golint)
    • Line 216: warning: exported function All should have comment or be unexported (golint)
    • Line 226: warning: exported function IsLocalStorage should have comment or be unexported (golint)
    • Line 232: warning: exported function DistinctJoin should have comment or be unexported (golint)
    • Line 236: warning: exported function Distinct should have comment or be unexported (golint)
    • Line 251: warning: exported function Ip2Int should have comment or be unexported (golint)
    • Line 262: warning: exported function IpRangeCount should have comment or be unexported (golint)
    • Line 267: warning: exported var PrivateIP1Start should have comment or be unexported (golint)
    • Line 281: warning: exported function IsPrivate should have comment or be unexported (golint)
    • Line 287: warning: exported function IsHostLocal should have comment or be unexported (golint)
    • Line 291: warning: exported function IsLinkLocal should have comment or be unexported (golint)
    • Line 295: warning: exported function IsExitAddress should have comment or be unexported (golint)
    • Line 303: warning: exported function Truncate should have comment or be unexported (golint)
    • Line 434: warning: exported function ToDurationE should have comment or be unexported (golint)
    • Line 458: warning: exported function ToDuration should have comment or be unexported (golint)
    • Line 503: warning: exported function GetSizeBytes should have comment or be unexported (golint)
    • Line 507: warning: exported function GetBytes should have comment or be unexported (golint)
    • Line 514: warning: exported function GetSizeGB should have comment or be unexported (golint)
    • Line 522: warning: exported function GetSizeMB should have comment or be unexported (golint)
    • Line 530: warning: exported function GetSizeKB should have comment or be unexported (golint)
    • Line 538: warning: exported function TransSQLAchemyURL should have comment or be unexported (golint)
    • Line 579: warning: exported function ComposeURL should have comment or be unexported (golint)
    • pkg/sortedmap/sortedmap.go
    • Line 22: warning: exported const INIT_CAPA should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type SSortedMap should have comment or be unexported (golint)
    • Line 32: warning: exported function NewSortedMap should have comment or be unexported (golint)
    • Line 36: warning: exported function NewSortedMapWithCapa should have comment or be unexported (golint)
    • Line 40: warning: exported function NewSortedMapFromMap should have comment or be unexported (golint)
    • Line 44: warning: exported function NewSortedMapFromMapWithCapa should have comment or be unexported (golint)
    • Line 55: warning: exported method SSortedMap.Keys should have comment or be unexported (golint)
    • Line 63: warning: exported function Add should have comment or be unexported (golint)
    • Line 82: warning: exported function Delete should have comment or be unexported (golint)
    • Line 109: warning: exported function DeleteIgnoreCase should have comment or be unexported (golint)
    • Line 142: warning: exported method SSortedMap.Get should have comment or be unexported (golint)
    • Line 146: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 151: warning: exported method SSortedMap.GetIgnoreCase should have comment or be unexported (golint)
    • Line 155: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 160: warning: exported method SSortedMap.Contains should have comment or be unexported (golint)
    • Line 165: warning: exported method SSortedMap.ContainsAny should have comment or be unexported (golint)
    • Line 175: warning: exported method SSortedMap.ContainsAll should have comment or be unexported (golint)
    • Line 185: warning: exported function Split should have comment or be unexported (golint)
    • Line 185: warning: don't use underscores in Go names; func result a_b should be aB (golint)
    • Line 185: warning: don't use underscores in Go names; func result b_a should be bA (golint)
    • Line 219: warning: comment on exported function Merge should be of the form "Merge ..." (golint)
    • pkg/util/osprofile/osprofile.go
    • Line 25: warning: exported const OS_TYPE_MACOS should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported var OS_TYPES should have comment or be unexported (golint)
    • Line 34: warning: exported var FS_TYPES should have comment or be unexported (golint)
    • Line 36: warning: exported var IMAGE_FORMAT_TYPES should have comment or be unexported (golint)
    • Line 39: warning: exported var DISK_DRIVERS should have comment or be unexported (golint)
    • Line 41: warning: exported var DISK_CACHE_MODES should have comment or be unexported (golint)
    • Line 43: warning: exported type SOSProfile should have comment or be unexported (golint)
    • Line 51: warning: exported function GetOSProfile should have comment or be unexported (golint)
    • Line 71: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 98: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 107: warning: exported function NormalizeOSType should have comment or be unexported (golint)
    • Line 116: warning: exported function GetOSProfileFromImageProperties should have comment or be unexported (golint)
    • pkg/util/cache/expiration_cache_fakes.go
    • Line 34: warning: exported type FakeExpirationPolicy should have comment or be unexported (golint)
    • Line 39: warning: exported method FakeExpirationPolicy.IsExpired should have comment or be unexported (golint)
    • Line 44: warning: exported function NewFakeExpirationStore should have comment or be unexported (golint)
    • pkg/util/reflectutils/jsonfield.go
    • Line 75: warning: exported function ParseStructFieldJsonInfo should have comment or be unexported (golint)
    • Line 79: warning: exported function ParseFieldJsonInfo should have comment or be unexported (golint)
    • Line 133: warning: receiver name info should be consistent with previous receiver name s for SStructFieldInfo (golint)
    • Line 140: warning: exported type SStructFieldValue should have comment or be unexported (golint)
    • Line 145: warning: exported type SStructFieldValueSet should have comment or be unexported (golint)
    • Line 147: warning: exported function FetchStructFieldValueSet should have comment or be unexported (golint)
    • Line 151: warning: exported function FetchStructFieldValueSetForWrite should have comment or be unexported (golint)
    • Line 155: warning: exported function FetchAllStructFieldValueSet should have comment or be unexported (golint)
    • Line 159: warning: exported function FetchAllStructFieldValueSetForWrite should have comment or be unexported (golint)
    • Line 278: warning: exported method SStructFieldValueSet.GetStructFieldIndex should have comment or be unexported (golint)
    • Line 286: warning: exported method SStructFieldValueSet.GetStructFieldIndexes should have comment or be unexported (golint)
    • Line 290: warning: exported method SStructFieldValueSet.GetStructFieldIndexes2 should have comment or be unexported (golint)
    • Line 322: warning: exported method SStructFieldValueSet.GetStructFieldIndexesMap should have comment or be unexported (golint)
    • Line 338: warning: exported method SStructFieldValueSet.GetValue should have comment or be unexported (golint)
    • Line 338: warning: receiver name set should be consistent with previous receiver name fields for SStructFieldValueSet (golint)
    • Line 346: warning: exported method SStructFieldValueSet.GetInterface should have comment or be unexported (golint)
    • Line 346: warning: receiver name set should be consistent with previous receiver name fields for SStructFieldValueSet (golint)
    • pkg/util/secrules/cut.go
    • Line 85: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 114: warning: don't use underscores in Go names; range var net_ should be net (golint)
    • Line 115: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 123: warning: don't use underscores in Go names; range var net_ should be net (golint)
    • Line 124: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 146: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 151: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 160: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 166: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 180: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 188: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 207: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 212: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 222: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 228: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 240: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 256: warning: don't use underscores in Go names; var src_ should be src (golint)
    • Line 269: warning: don't use underscores in Go names; var src_ should be src (golint)
    • pkg/util/secrules/secruleset.go
    • Line 25: warning: exported type SecurityRuleSet should have comment or be unexported (golint)
    • Line 61: warning: exported method SecurityRuleSet.Equals should have comment or be unexported (golint)
    • Line 79: warning: comment on exported method SecurityRuleSet.AllowList should be of the form "AllowList ..." (golint)
    • Line 110: warning: don't use underscores in Go names; var srs_ should be srs (golint)
    • Line 112: warning: don't use underscores in Go names; range var sr_ should be sr (golint)
    • pkg/errors/errors.go
    • Line 19: warning: exported type Error should have comment or be unexported (golint)
    • Line 25: warning: exported function Wrap should have comment or be unexported (golint)
    • Line 29: warning: exported function Wrapf should have comment or be unexported (golint)
    • Line 33: warning: exported function Cause should have comment or be unexported (golint)
    • Line 37: warning: exported function Errorf should have comment or be unexported (golint)
    • pkg/util/stringutils/stringutils.go
    • Line 27: warning: exported function ParseNamePattern should have comment or be unexported (golint)
    • Line 49: warning: exported function UUID4 should have comment or be unexported (golint)
    • Line 54: warning: exported function Interface2String should have comment or be unexported (golint)
    • Line 79: warning: exported function SplitKeyValue should have comment or be unexported (golint)
    • Line 83: warning: exported function SplitKeyValueBySep should have comment or be unexported (golint)
    • pkg/util/sets/byte.go
    • Line 40: warning: comment on exported type Byte should be of the form "Byte ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported function NewByte should be of the form "NewByte ..." (golint)
    • Line 124: warning: receiver name s1 should be consistent with previous receiver name s for Byte (golint)
    • Line 140: warning: receiver name s1 should be consistent with previous receiver name s for Byte (golint)
    • Line 159: warning: receiver name s1 should be consistent with previous receiver name s for Byte (golint)
    • Line 171: warning: receiver name s1 should be consistent with previous receiver name s for Byte (golint)
    • Line 200: warning: comment on exported method Byte.PopAny should be of the form "PopAny ..." (golint)
    • pkg/util/timeutils/timeutils.go
    • Line 26: warning: exported function UtcNow should have comment or be unexported (golint)
    • Line 30: warning: exported function Utcify should have comment or be unexported (golint)
    • Line 34: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 39: warning: exported function Localify should have comment or be unexported (golint)
    • Line 47: warning: exported const IsoTimeFormat should have comment (or a comment on this block) or be unexported (golint)
    • Line 64: warning: exported function IsoTime should have comment or be unexported (golint)
    • Line 68: warning: exported function IsoNoSecondTime should have comment or be unexported (golint)
    • Line 72: warning: exported function FullIsoTime should have comment or be unexported (golint)
    • Line 76: warning: exported function FullIsoNanoTime should have comment or be unexported (golint)
    • Line 80: warning: exported function MysqlTime should have comment or be unexported (golint)
    • Line 84: warning: exported function CompactTime should have comment or be unexported (golint)
    • Line 88: warning: exported function RFC2882Time should have comment or be unexported (golint)
    • Line 92: warning: exported function DateStr should have comment or be unexported (golint)
    • Line 96: warning: exported function ShortDate should have comment or be unexported (golint)
    • Line 100: warning: exported function MonthStr should have comment or be unexported (golint)
    • Line 104: warning: exported function ShortMonth should have comment or be unexported (golint)
    • Line 108: warning: exported function ZStackTime should have comment or be unexported (golint)
    • Line 112: warning: exported function ParseIsoTime should have comment or be unexported (golint)
    • Line 116: warning: exported function ParseIsoNoSecondTime should have comment or be unexported (golint)
    • Line 142: warning: exported function ParseFullIsoTime should have comment or be unexported (golint)
    • Line 146: warning: exported function ParseMysqlTime should have comment or be unexported (golint)
    • Line 150: warning: exported function ParseNormalTime should have comment or be unexported (golint)
    • Line 154: warning: exported function ParseFullNormalTime should have comment or be unexported (golint)
    • Line 158: warning: exported function ParseCompactTime should have comment or be unexported (golint)
    • Line 162: warning: exported function ParseRFC2882Time should have comment or be unexported (golint)
    • Line 166: warning: exported function ParseDate should have comment or be unexported (golint)
    • Line 170: warning: exported function ParseShortDate should have comment or be unexported (golint)
    • Line 174: warning: exported function ParseZStackDate should have comment or be unexported (golint)
    • Line 178: warning: exported function ParseTimeStr should have comment or be unexported (golint)
    • Line 207: warning: exported function ParseTimeStrInLocation should have comment or be unexported (golint)
    • Line 219: warning: exported function ParseTimeStrInTimeZone should have comment or be unexported (golint)
    • Line 230: warning: exported function TimeZoneOffset should have comment or be unexported (golint)
    • pkg/util/filterclause/filterclause.go
    • Line 27: warning: exported type SFilterClause should have comment or be unexported (golint)
    • Line 33: warning: comment on exported type SJointFilterClause should be of the form "SJointFilterClause ..." (with optional leading article) (golint)
    • Line 41: warning: exported method SJointFilterClause.GetJointFilter should have comment or be unexported (golint)
    • Line 45: warning: exported method SJointFilterClause.GetJointModelName should have comment or be unexported (golint)
    • Line 63: warning: exported method SFilterClause.QueryCondition should have comment or be unexported (golint)
    • Line 124: warning: exported method SFilterClause.GetField should have comment or be unexported (golint)
    • Line 142: warning: exported function ParseFilterClause should have comment or be unexported (golint)
    • Line 152: warning: exported function ParseJointFilterClause should have comment or be unexported (golint)
    • pkg/util/reflectutils/reflectutils.go
    • Line 99: warning: exported function FindStructFieldValue should have comment or be unexported (golint)
    • Line 108: warning: exported function FindStructFieldInterface should have comment or be unexported (golint)
    • Line 113: warning: exported function FillEmbededStructValue should have comment or be unexported (golint)
    • Line 122: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 134: warning: exported function SetStructFieldValue should have comment or be unexported (golint)
    • Line 147: warning: exported function ExpandInterface should have comment or be unexported (golint)
    • Line 155: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 178: warning: exported function FindAnonymouStructPointer should have comment or be unexported (golint)
    • Line 207: warning: exported function StructContains should have comment or be unexported (golint)
    • pkg/util/regutils/regutils.go
    • Line 23: warning: exported var FUNCTION_REG should have comment or be unexported (golint)
    • Line 24: warning: exported var UUID_REG should have comment or be unexported (golint)
    • Line 25: warning: exported var UUID_EXACT_REG should have comment or be unexported (golint)
    • Line 26: warning: exported var INTEGER_REG should have comment or be unexported (golint)
    • Line 27: warning: exported var FLOAT_REG should have comment or be unexported (golint)
    • Line 28: warning: exported var MACADDR_REG should have comment or be unexported (golint)
    • Line 29: warning: exported var COMPACT_MACADDR_REG should have comment or be unexported (golint)
    • Line 30: warning: exported var NSPTR_REG should have comment or be unexported (golint)
    • Line 31: warning: exported var NAME_REG should have comment or be unexported (golint)
    • Line 32: warning: exported var DOMAINNAME_REG should have comment or be unexported (golint)
    • Line 33: warning: exported var DOMAINSRV_REG should have comment or be unexported (golint)
    • Line 34: warning: exported var SIZE_REG should have comment or be unexported (golint)
    • Line 35: warning: exported var MONTH_REG should have comment or be unexported (golint)
    • Line 36: warning: exported var DATE_REG should have comment or be unexported (golint)
    • Line 37: warning: exported var DATE_COMPACT_REG should have comment or be unexported (golint)
    • Line 38: warning: exported var ISO_TIME_REG should have comment or be unexported (golint)
    • Line 39: warning: exported var ISO_NO_SECOND_TIME_REG should have comment or be unexported (golint)
    • Line 40: warning: exported var FULLISO_TIME_REG should have comment or be unexported (golint)
    • Line 41: warning: exported var ZSTACK_TIME_REG should have comment or be unexported (golint)
    • Line 42: warning: exported var COMPACT_TIME_REG should have comment or be unexported (golint)
    • Line 43: warning: exported var MYSQL_TIME_REG should have comment or be unexported (golint)
    • Line 44: warning: exported var NORMAL_TIME_REG should have comment or be unexported (golint)
    • Line 45: warning: exported var FULLNORMAL_TIME_REG should have comment or be unexported (golint)
    • Line 46: warning: exported var RFC2882_TIME_REG should have comment or be unexported (golint)
    • Line 47: warning: exported var EMAIL_REG should have comment or be unexported (golint)
    • Line 48: warning: exported var CHINA_MOBILE_REG should have comment or be unexported (golint)
    • Line 49: warning: exported var FS_FORMAT_REG should have comment or be unexported (golint)
    • Line 50: warning: exported var US_CURRENCY_REG should have comment or be unexported (golint)
    • Line 51: warning: exported var EU_CURRENCY_REG should have comment or be unexported (golint)
    • Line 84: warning: exported function MatchFunction should have comment or be unexported (golint)
    • Line 88: warning: exported function MatchUUID should have comment or be unexported (golint)
    • Line 92: warning: exported function MatchUUIDExact should have comment or be unexported (golint)
    • Line 96: warning: exported function MatchInteger should have comment or be unexported (golint)
    • Line 100: warning: exported function MatchFloat should have comment or be unexported (golint)
    • Line 104: warning: exported function MatchMacAddr should have comment or be unexported (golint)
    • Line 108: warning: exported function MatchCompactMacAddr should have comment or be unexported (golint)
    • Line 112: warning: exported function MatchIP4Addr should have comment or be unexported (golint)
    • Line 117: warning: exported function MatchCIDR should have comment or be unexported (golint)
    • Line 125: warning: exported function MatchIP6Addr should have comment or be unexported (golint)
    • Line 130: warning: exported function MatchIPAddr should have comment or be unexported (golint)
    • Line 135: warning: exported function MatchPtr should have comment or be unexported (golint)
    • Line 139: warning: exported function MatchName should have comment or be unexported (golint)
    • Line 143: warning: exported function MatchDomainName should have comment or be unexported (golint)
    • Line 150: warning: exported function MatchDomainSRV should have comment or be unexported (golint)
    • Line 173: warning: exported function MatchSize should have comment or be unexported (golint)
    • Line 177: warning: exported function MatchMonth should have comment or be unexported (golint)
    • Line 181: warning: exported function MatchDate should have comment or be unexported (golint)
    • Line 185: warning: exported function MatchDateCompact should have comment or be unexported (golint)
    • Line 189: warning: exported function MatchZStackTime should have comment or be unexported (golint)
    • Line 193: warning: exported function MatchISOTime should have comment or be unexported (golint)
    • Line 197: warning: exported function MatchISONoSecondTime should have comment or be unexported (golint)
    • Line 201: warning: exported function MatchFullISOTime should have comment or be unexported (golint)
    • Line 205: warning: exported function MatchCompactTime should have comment or be unexported (golint)
    • Line 209: warning: exported function MatchMySQLTime should have comment or be unexported (golint)
    • Line 213: warning: exported function MatchNormalTime should have comment or be unexported (golint)
    • Line 217: warning: exported function MatchFullNormalTime should have comment or be unexported (golint)
    • Line 221: warning: exported function MatchRFC2882Time should have comment or be unexported (golint)
    • Line 225: warning: exported function MatchEmail should have comment or be unexported (golint)
    • Line 229: warning: exported function MatchMobile should have comment or be unexported (golint)
    • Line 233: warning: exported function MatchFS should have comment or be unexported (golint)
    • Line 237: warning: exported function MatchUSCurrency should have comment or be unexported (golint)
    • Line 241: warning: exported function MatchEUCurrency should have comment or be unexported (golint)
    • pkg/util/clock/clock.go
    • Line 52: warning: comment on exported method RealClock.After should be of the form "After ..." (golint)
    • Line 57: warning: exported method RealClock.NewTimer should have comment or be unexported (golint)
    • Line 63: warning: exported method RealClock.Tick should have comment or be unexported (golint)
    • Line 67: warning: exported method RealClock.Sleep should have comment or be unexported (golint)
    • Line 88: warning: exported function NewFakeClock should have comment or be unexported (golint)
    • Line 108: warning: comment on exported method FakeClock.After should be of the form "After ..." (golint)
    • Line 121: warning: comment on exported method FakeClock.NewTimer should be of the form "NewTimer ..." (golint)
    • Line 138: warning: exported method FakeClock.Tick should have comment or be unexported (golint)
    • Line 153: warning: comment on exported method FakeClock.Step should be of the form "Step ..." (golint)
    • Line 160: warning: comment on exported method FakeClock.SetTime should be of the form "SetTime ..." (golint)
    • Line 200: warning: comment on exported method FakeClock.HasWaiters should be of the form "HasWaiters ..." (golint)
    • Line 208: warning: exported method FakeClock.Sleep should have comment or be unexported (golint)
    • Line 229: warning: comment on exported method IntervalClock.After should be of the form "After ..." (golint)
    • Line 235: warning: comment on exported method IntervalClock.NewTimer should be of the form "NewTimer ..." (golint)
    • Line 241: warning: comment on exported method IntervalClock.Tick should be of the form "Tick ..." (golint)
    • Line 247: warning: exported method IntervalClock.Sleep should have comment or be unexported (golint)
    • pkg/prettytable/prettytable.go
    • Line 23: warning: exported type AlignmentType should have comment or be unexported (golint)
    • Line 26: warning: exported const AlignLeft should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported const TabWidth should have comment or be unexported (golint)
    • Line 38: warning: exported type PrettyTable should have comment or be unexported (golint)
    • Line 45: warning: exported function NewPrettyTable should have comment or be unexported (golint)
    • Line 56: warning: exported function NewPrettyTableWithTryTermWidth should have comment or be unexported (golint)
    • Line 241: warning: exported method PrettyTable.MaxLineWidth should have comment or be unexported (golint)
    • Line 241: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 245: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 259: warning: exported method PrettyTable.GetString should have comment or be unexported (golint)
    • Line 259: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • pkg/util/trace/trace.go
    • Line 31: warning: exported type Trace should have comment or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • Line 41: warning: exported method Trace.Step should have comment or be unexported (golint)
    • Line 49: warning: exported method Trace.Log should have comment or be unexported (golint)
    • Line 77: warning: exported method Trace.LogIfLong should have comment or be unexported (golint)
    • Line 85: warning: exported method Trace.TotalTime should have comment or be unexported (golint)
    • pkg/util/secrules/securityruleset.go
    • Line 23: warning: exported type SecurityGroupSubSubRuleSet should have comment or be unexported (golint)
    • Line 56: warning: exported type SecurityGroupSubRuleSet should have comment or be unexported (golint)
    • Line 130: warning: exported type SecurityGroupRuleSet should have comment or be unexported (golint)
    • Line 134: warning: exported method SecurityGroupRuleSet.AddRule should have comment or be unexported (golint)
    • Line 188: warning: exported method SecurityGroupRuleSet.IsEqual should have comment or be unexported (golint)
    • pkg/utils/fibonacci_retrier.go
    • Line 31: warning: exported const FibonacciRetrierErrorMaxTriesExceeded should have comment (or a comment on this block) or be unexported (golint)
    • Line 123: warning: comment on exported method FibonacciRetrier.Tried should be of the form "Tried ..." (golint)
    • Line 161: warning: comment on exported function NewFibonacciRetrierMaxElapse should be of the form "NewFibonacciRetrierMaxElapse ..." (golint)
    • pkg/util/delayedwork/delayedwork.go
    • Line 14: warning: exported type DelayedWorkFunc should have comment or be unexported (golint)
    • Line 35: warning: exported type DelayedWorkManager should have comment or be unexported (golint)
    • Line 41: warning: exported function NewDelayedWorkManager should have comment or be unexported (golint)
    • Line 56: warning: exported method DelayedWorkManager.Start should have comment or be unexported (golint)
    • Line 116: warning: exported method DelayedWorkManager.Submit should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words

    • pkg/util/reflectutils/jsonfield_test.go
    • Line 89: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 93: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 97: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 211: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 215: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 218: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 229: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 271: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 277: warning: "Embeded" is a misspelling of "Embedded" (misspell)
    • Line 282: warning: "Embeded" is a misspelling of "Embedded" (misspell)