Preparing report...

Report for github.com/Kretech/xgo

A+    Excellent!    Found 51 issues across 93 files

Tweet

gofmt98%

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!


gocyclo97%

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.


golint48%

Golint is a linter for Go source code.

    • xgo/dump/serialize.go
    • Line 17: warning: comment on exported var OptShowUint8AsChar should be of the form "OptShowUint8AsChar ..." (golint)
    • Line 20: warning: comment on exported var OptShowUint8sAsString should be of the form "OptShowUint8sAsString ..." (golint)
    • Line 23: warning: comment on exported var OptSortMapKeys should be of the form "OptSortMapKeys ..." (golint)
    • Line 28: warning: exported var MaxSliceLen should have comment or be unexported (golint)
    • Line 37: warning: exported const Zero should have comment (or a comment on this block) or be unexported (golint)
    • Line 73: warning: exported function Serialize should have comment or be unexported (golint)
    • xgo/http/form/form.go
    • Line 8: warning: exported type Form should have comment or be unexported (golint)
    • Line 12: warning: exported function New should have comment or be unexported (golint)
    • Line 16: warning: exported method Form.GetString should have comment or be unexported (golint)
    • Line 16: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 20: warning: exported method Form.GetInt should have comment or be unexported (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 29: warning: exported method Form.ToStringMap should have comment or be unexported (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • xgo/array/array.go
    • Line 14: warning: comment on exported type Array should be of the form "Array ..." (with optional leading article) (golint)
    • Line 40: warning: should omit 2nd value from range; this loop is equivalent to `for idx := range ...` (golint)
    • Line 61: warning: exported method Array.KeyBy 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 71: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • xgo/word/case_convert.go
    • Line 46: warning: exported function UpperFirst should have comment or be unexported (golint)
    • Line 50: warning: exported function LowerFirst should have comment or be unexported (golint)
    • xgo/encoding/json.go
    • Line 11: warning: exported type Opt should have comment or be unexported (golint)
    • Line 14: warning: exported const OptEscapeHtml should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported method Opt.Apply should have comment or be unexported (golint)
    • Line 41: warning: exported function JsonEncode should have comment or be unexported (golint)
    • Line 69: warning: exported function JsonDecode should have comment or be unexported (golint)
    • xgo/firewall/sleeplimiter.go
    • Line 19: warning: exported function NewSleepLimiter should have comment or be unexported (golint)
    • Line 24: warning: exported method SleepLimiter.Acquire 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)
    • xgo/pipe/pipes.go
    • Line 7: warning: exported type Pipes should have comment or be unexported (golint)
    • Line 12: warning: comment on exported function NewPipes should be of the form "NewPipes ..." (golint)
    • Line 24: warning: exported method Pipes.Start 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 34: warning: exported method Pipes.Stop should have comment or be unexported (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 44: warning: exported method Pipes.AcquirePipe should have comment or be unexported (golint)
    • Line 44: 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 Pipes.ReleasePipe 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 Pipes.WriteAndRead 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)
    • xgo/test/assert_util.go
    • Line 11: warning: comment on exported var BeTrue should be of the form "BeTrue ..." (golint)
    • Line 13: warning: exported var BeNil should have comment or be unexported (golint)
    • Line 17: warning: exported function AssertTrue should have comment or be unexported (golint)
    • Line 21: warning: exported function AssertNil should have comment or be unexported (golint)
    • Line 25: warning: comment on exported function AssertEqual should be of the form "AssertEqual ..." (golint)
    • xgo/httpclient/request.go
    • Line 24: warning: comment on exported function NewRequest should be of the form "NewRequest ..." (golint)
    • Line 87: warning: exported var DefaultHttpClient should have comment or be unexported (golint)
    • xgo/digo/digo.go
    • Line 8: warning: exported var ErrNotBound should have comment or be unexported (golint)
    • Line 11: warning: exported type DIGo should have comment or be unexported (golint)
    • Line 62: warning: exported type Hook should have comment or be unexported (golint)
    • Line 64: warning: comment on exported function NewDIGo should be of the form "NewDIGo ..." (golint)
    • xgo/firewall/semaphore.go
    • Line 3: warning: exported type Semaphore should have comment or be unexported (golint)
    • Line 11: warning: comment on exported function NewSemaphore should be of the form "NewSemaphore ..." (golint)
    • Line 16: warning: comment on exported type ChanSemaphore should be of the form "ChanSemaphore ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported function NewChanSemaphore should be of the form "NewChanSemaphore ..." (golint)
    • Line 27: warning: exported method ChanSemaphore.Release should have comment or be unexported (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 31: warning: exported method ChanSemaphore.Acquire should have comment or be unexported (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • xgo/httpclient/response.go
    • Line 13: warning: exported type Response should have comment or be unexported (golint)
    • Line 19: warning: exported method Response.Bytes should have comment or be unexported (golint)
    • Line 43: warning: exported var Unmarshalers should have comment or be unexported (golint)
    • Line 54: warning: exported method Response.To should have comment or be unexported (golint)
    • Line 88: warning: exported method Response.ToInterface should have comment or be unexported (golint)
    • Line 94: warning: exported method Response.UnwrapTo should have comment or be unexported (golint)
    • Line 109: warning: exported method Response.UnwrapToInterface should have comment or be unexported (golint)
    • xgo/dynamic/compact.go
    • Line 3: warning: exported method Name.Compact should have comment or be unexported (golint)
    • Line 7: warning: exported method Name.DepthCompact should have comment or be unexported (golint)
    • xgo/gotemplate/function.go
    • Line 9: warning: exported function UseFuncAll should have comment or be unexported (golint)
    • Line 15: warning: exported function UseFuncSets should have comment or be unexported (golint)
    • Line 25: warning: exported var StringSet should have comment or be unexported (golint)
    • xgo/date/date.go
    • Line 10: warning: exported function TimeOffset should have comment or be unexported (golint)
    • Line 67: warning: exported function LocalFormat should have comment or be unexported (golint)
    • Line 80: warning: comment on exported function StrToTime should be of the form "StrToTime ..." (golint)
    • xgo/p/compact.go
    • Line 12: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 127: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 166: warning: comment on exported function DepthCompact should be of the form "DepthCompact ..." (golint)
    • xgo/p/dump.go
    • Line 16: warning: exported var MaxSliceLen should have comment or be unexported (golint)
    • Line 23: warning: comment on exported var StringQuota should be of the form "StringQuota ..." (golint)
    • Line 27: warning: comment on exported function Dump should be of the form "Dump ..." (golint)
    • Line 40: warning: exported function DepthDump should have comment or be unexported (golint)
    • Line 164: warning: comment on exported function IsScala should be of the form "IsScala ..." (golint)
    • xgo/test/runner.go
    • Line 5: warning: exported type TestRunner should have comment or be unexported (golint)
    • Line 9: warning: exported function TR should have comment or be unexported (golint)
    • Line 15: warning: exported method TestRunner.Add should have comment or be unexported (golint)
    • Line 15: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • xgo/dump/dumper.go
    • Line 10: warning: comment on exported var Disable should be of the form "Disable ..." (golint)
    • Line 15: warning: exported function Dump should have comment or be unexported (golint)
    • xgo/httpclient/client.go
    • Line 16: warning: exported type HostGetter should have comment or be unexported (golint)
    • Line 18: warning: exported type Client should have comment or be unexported (golint)
    • Line 24: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 31: warning: exported method Client.SetHost should have comment or be unexported (golint)
    • Line 36: warning: exported method Client.SetHostGetter should have comment or be unexported (golint)
    • Line 41: warning: exported method Client.Get should have comment or be unexported (golint)
    • Line 57: warning: exported method Client.PostForm should have comment or be unexported (golint)
    • Line 61: warning: exported method Client.PostJSON should have comment or be unexported (golint)
    • Line 70: warning: exported method Client.Post should have comment or be unexported (golint)
    • Line 78: warning: exported method Client.DoRequest should have comment or be unexported (golint)
    • Line 91: warning: exported var Default should have comment or be unexported (golint)
    • xgo/string/string.go
    • Line 8: warning: exported type String should have comment or be unexported (golint)
    • Line 10: warning: comment on exported function New should be of the form "New ..." (golint)
    • xgo/version/compare.go
    • Line 10: warning: exported var ErrOverflowSection should have comment or be unexported (golint)
    • Line 11: warning: exported var ErrOverSize should have comment or be unexported (golint)
    • Line 19: warning: exported type T should have comment or be unexported (golint)
    • Line 70: warning: exported function Compare should have comment or be unexported (golint)
    • Line 96: warning: exported function LessThan should have comment or be unexported (golint)
    • Line 105: warning: exported function GreaterThan should have comment or be unexported (golint)
    • Line 114: warning: exported function Equal should have comment or be unexported (golint)
    • xgo/version/semver.go
    • Line 11: warning: exported type SemVer should have comment or be unexported (golint)
    • Line 17: warning: comment on exported function Parse should be of the form "Parse ..." (golint)
    • Line 40: warning: exported method SemVer.NumberString should have comment or be unexported (golint)
    • Line 44: warning: exported method SemVer.NextMajor should have comment or be unexported (golint)
    • Line 48: warning: exported method SemVer.NextMinor should have comment or be unexported (golint)
    • Line 52: warning: exported method SemVer.NextPatch should have comment or be unexported (golint)
    • xgo/pipe/exec_pipe.go
    • Line 12: warning: exported type ExecPipe should have comment or be unexported (golint)
    • Line 23: warning: exported function NewExecPipe should have comment or be unexported (golint)
    • Line 27: warning: exported method ExecPipe.Start should have comment or be unexported (golint)
    • Line 27: 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 ExecPipe.Stop 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 ExecPipe.WriteAndRead 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)
    • xgo/crypt/crypt.go
    • Line 9: warning: exported function Md5 should have comment or be unexported (golint)
    • Line 13: warning: exported function Sha1 should have comment or be unexported (golint)
    • xgo/dynamic/function_test.go
    • Line 23: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • xgo/date/carbon/carbon.go
    • Line 9: warning: comment on exported type Carbon should be of the form "Carbon ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported function In should be of the form "In ..." (golint)
    • Line 22: warning: exported function Now should have comment or be unexported (golint)
    • Line 26: warning: exported function UnixOf should have comment or be unexported (golint)
    • Line 31: warning: exported function TimeOf should have comment or be unexported (golint)
    • Line 35: warning: comment on exported function StrOf should be of the form "StrOf ..." (golint)
    • Line 40: warning: comment on exported function Parse should be of the form "Parse ..." (golint)
    • Line 47: warning: comment on exported function TParse should be of the form "TParse ..." (golint)
    • Line 58: warning: exported method Carbon.Clone should have comment or be unexported (golint)
    • Line 62: warning: exported method Carbon.Time should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method Carbon.In should be of the form "In ..." (golint)
    • Line 72: warning: exported method Carbon.Add should have comment or be unexported (golint)
    • Line 77: warning: comment on exported method Carbon.SubTime should be of the form "SubTime ..." (golint)
    • Line 82: warning: comment on exported method Carbon.Sub should be of the form "Sub ..." (golint)
    • xgo/dict/map_dict.go
    • Line 14: warning: exported var ErrNotDict should have comment or be unexported (golint)
    • Line 17: warning: exported type MapDict should have comment or be unexported (golint)
    • Line 25: warning: exported function NewMapDict should have comment or be unexported (golint)
    • Line 31: warning: exported method MapDict.IsEmpty should have comment or be unexported (golint)
    • Line 35: warning: exported method MapDict.Len should have comment or be unexported (golint)
    • Line 39: warning: exported method MapDict.Get should have comment or be unexported (golint)
    • Line 54: warning: exported method MapDict.Set should have comment or be unexported (golint)
    • Line 76: warning: exported method MapDict.Forget should have comment or be unexported (golint)
    • Line 80: warning: exported method MapDict.ParseJsonString should have comment or be unexported (golint)
    • Line 85: warning: exported function JsonToMap should have comment or be unexported (golint)
    • Line 102: warning: exported method MapDict.Keys should have comment or be unexported (golint)
    • Line 109: warning: exported method MapDict.Values should have comment or be unexported (golint)
    • Line 116: warning: exported method MapDict.Filter should have comment or be unexported (golint)
    • Line 126: warning: exported method MapDict.Each should have comment or be unexported (golint)
    • Line 132: warning: exported method MapDict.Data should have comment or be unexported (golint)
    • Line 136: warning: exported method MapDict.SetData should have comment or be unexported (golint)
    • Line 140: warning: exported method MapDict.Json should have comment or be unexported (golint)
    • xgo/encoding/base64.go
    • Line 5: warning: exported function Base64Decode should have comment or be unexported (golint)
    • Line 10: warning: exported function Base64EncodeString should have comment or be unexported (golint)
    • Line 14: warning: exported function Base64Encode should have comment or be unexported (golint)
    • xgo/firewall/resource_limiter.go
    • Line 3: warning: exported type ResourceLimiter should have comment or be unexported (golint)
    • Line 8: warning: exported type ChanResourceLimiter should have comment or be unexported (golint)
    • Line 18: warning: exported method ChanResourceLimiter.Acquire should have comment or be unexported (golint)
    • Line 18: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 22: warning: exported method ChanResourceLimiter.Release should have comment or be unexported (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • xgo/test/assert.go
    • Line 5: warning: exported type Assert should have comment or be unexported (golint)
    • Line 9: warning: exported function A should have comment or be unexported (golint)
    • Line 13: warning: exported method Assert.Equal should have comment or be unexported (golint)
    • Line 17: warning: exported method Assert.True should have comment or be unexported (golint)
    • Line 21: warning: exported method Assert.Must should have comment or be unexported (golint)
    • xgo/astutil/log.go
    • Line 10: warning: exported type Writer should have comment or be unexported (golint)
    • Line 18: warning: exported method Writer.SetOutput should have comment or be unexported (golint)
    • Line 24: warning: exported function SetLogOutput should have comment or be unexported (golint)
    • Line 28: warning: exported function EnableLog should have comment or be unexported (golint)
    • Line 32: warning: exported function DisableLog should have comment or be unexported (golint)
    • xgo/dump/cli_dumper.go
    • Line 14: warning: exported type CliDumper should have comment or be unexported (golint)
    • Line 21: warning: exported var DefaultWriter should have comment or be unexported (golint)
    • Line 23: warning: comment on exported var ShowFileLine1 should be of the form "ShowFileLine1 ..." (golint)
    • Line 28: warning: exported function NewCliDumper should have comment or be unexported (golint)
    • Line 34: warning: exported method CliDumper.Dump should have comment or be unexported (golint)
    • Line 40: warning: exported method CliDumper.DepthDump should have comment or be unexported (golint)
    • xgo/httpclient/wrapper.go
    • Line 5: warning: comment on exported type ResponseWrapper should be of the form "ResponseWrapper ..." (with optional leading article) (golint)
    • Line 12: warning: exported type CEDResponseWrapper should have comment or be unexported (golint)
    • Line 26: warning: exported type HasData should have comment or be unexported (golint)
    • Line 30: warning: exported method HasData.SetData should have comment or be unexported (golint)
    • Line 34: warning: exported method HasData.GetData should have comment or be unexported (golint)
    • xgo/dynamic/variant_name.go
    • Line 14: warning: exported type Name should have comment or be unexported (golint)
    • Line 24: warning: exported function NameOf should have comment or be unexported (golint)
    • Line 96: warning: exported function VarName should have comment or be unexported (golint)
    • Line 101: warning: exported function VarNameDepth should have comment or be unexported (golint)
    • Line 118: warning: receiver name name should be consistent with previous receiver name n for Name (golint)
    • xgo/char/char.go
    • Line 5: warning: exported function IsUpper should have comment or be unexported (golint)
    • Line 9: warning: exported function IsLower should have comment or be unexported (golint)
    • Line 13: warning: exported function IsAlpha should have comment or be unexported (golint)
    • Line 17: warning: exported function IsNumber should have comment or be unexported (golint)
    • Line 21: warning: exported function IsHan should have comment or be unexported (golint)
    • Line 25: warning: exported function IsHanString should have comment or be unexported (golint)
    • xgo/digo/digo_impl.go
    • Line 10: warning: exported type Type should have comment or be unexported (golint)
    • Line 11: warning: exported type Value should have comment or be unexported (golint)
    • Line 12: warning: exported type Kind should have comment or be unexported (golint)
    • Line 16: warning: exported var TypeOf should have comment or be unexported (golint)
    • Line 20: warning: exported type DImpl should have comment or be unexported (golint)
    • Line 42: warning: exported function NewDiGoImpl should have comment or be unexported (golint)
    • Line 55: warning: exported method DImpl.InvokePtr should have comment or be unexported (golint)
    • Line 74: warning: exported method DImpl.SingletonFunc should have comment or be unexported (golint)
    • Line 85: warning: exported method DImpl.Singleton should have comment or be unexported (golint)
    • Line 94: warning: exported method DImpl.FillClass should have comment or be unexported (golint)
    • Line 109: warning: exported method DImpl.MapSingleton should have comment or be unexported (golint)
    • Line 129: warning: exported method DImpl.BindFunc should have comment or be unexported (golint)
    • Line 129: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 133: warning: exported method DImpl.InvokeFunc should have comment or be unexported (golint)
    • xgo/collection/skiplist.go
    • Line 5: warning: exported const MAX_LEVEL should have comment or be unexported (golint)
    • Line 6: warning: exported const P should have comment or be unexported (golint)
    • Line 15: warning: exported type SkipListNode should have comment or be unexported (golint)
    • Line 28: warning: exported function NewSkipList should have comment or be unexported (golint)
    • xgo/firewall/mutexlimiter.go
    • Line 9: warning: exported type MutexLimiter should have comment or be unexported (golint)
    • Line 19: warning: exported method MutexLimiter.Acquire should have comment or be unexported (golint)
    • Line 35: warning: exported function NewMutexLimiter should have comment or be unexported (golint)
    • xgo/dynamic/caller.go
    • Line 8: warning: exported function CallerName should have comment or be unexported (golint)
    • Line 12: warning: exported function CallerNameSkip should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!