Preparing report...

Report for github.com/lishimeng/go-libs

A    Great!    Found 24 issues across 31 files

Tweet

gofmt90%

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!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint29%

Golint is a linter for Go source code.

    • go-libs/stream/reactor/io.sdk.go
    • Line 12: warning: exported const ModeSync should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: error var TimeoutErr should have name of the form ErrFoo (golint)
    • Line 17: warning: exported var TimeoutErr should have comment or be unexported (golint)
    • Line 20: warning: exported type Stream should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 45: warning: exported function CreateWithRWC should have comment or be unexported (golint)
    • Line 67: warning: exported method Stream.DataListener should have comment or be unexported (golint)
    • Line 72: warning: exported method Stream.OnConnectionLost should have comment or be unexported (golint)
    • Line 80: warning: comment on exported method Stream.ReadSync should be of the form "ReadSync ..." (golint)
    • Line 111: warning: exported method Stream.Close should have comment or be unexported (golint)
    • go-libs/codec/tlv/tlv.decoder.go
    • Line 10: warning: exported function DecodeData should have comment or be unexported (golint)
    • Line 36: warning: exported function DecodeTlvTag should have comment or be unexported (golint)
    • Line 82: warning: exported function DecodeTlv should have comment or be unexported (golint)
    • go-libs/stream/pipeline/handler/h.go
    • Line 3: warning: exported type CoderSort should have comment or be unexported (golint)
    • Line 6: warning: exported const SortASC should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: comment on exported type Meta should be of the form "Meta ..." (with optional leading article) (golint)
    • Line 17: warning: exported method Meta.Index should have comment or be unexported (golint)
    • Line 21: warning: exported type Container should have comment or be unexported (golint)
    • Line 28: warning: exported type TxContainer should have comment or be unexported (golint)
    • Line 31: warning: exported type RxContainer should have comment or be unexported (golint)
    • go-libs/stream/pipeline/handler/io.pipeline.container.go
    • Line 8: warning: exported function NewContainer should have comment or be unexported (golint)
    • Line 17: warning: exported method Container.RegisterHandlers should have comment or be unexported (golint)
    • Line 30: warning: exported method Container.Register should have comment or be unexported (golint)
    • Line 59: warning: exported method Container.HasNext should have comment or be unexported (golint)
    • Line 78: warning: exported method Container.Get should have comment or be unexported (golint)
    • Line 98: warning: exported method Container.Next should have comment or be unexported (golint)
    • Line 108: warning: exported method Container.FirstHandler should have comment or be unexported (golint)
    • go-libs/stream/serial/serial.go
    • Line 8: warning: exported type Config should have comment or be unexported (golint)
    • Line 10: warning: exported type Connector should have comment or be unexported (golint)
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 23: warning: exported method Connector.Connect should have comment or be unexported (golint)
    • Line 32: warning: exported method Connector.Close should have comment or be unexported (golint)
    • go-libs/script/js.engine.go
    • Line 10: warning: exported type JsEngine should have comment or be unexported (golint)
    • Line 16: warning: exported function Create should have comment or be unexported (golint)
    • Line 21: warning: exported function CreateWithTimeout should have comment or be unexported (golint)
    • Line 40: warning: exported function LoadScript should have comment or be unexported (golint)
    • Line 56: warning: exported function CallFunc should have comment or be unexported (golint)
    • Line 75: warning: exported function Execute should have comment or be unexported (golint)
    • go-libs/etc/config.go
    • Line 11: warning: exported function LoadEnvs should have comment or be unexported (golint)
    • Line 25: warning: exported function SaveEnvs should have comment or be unexported (golint)
    • go-libs/file/file.go
    • Line 9: warning: exported function RemoveSrc should have comment or be unexported (golint)
    • Line 15: warning: exported function Copy should have comment or be unexported (golint)
    • go-libs/jwt/jwt.go
    • Line 9: warning: exported type BaseToken should have comment or be unexported (golint)
    • Line 14: warning: exported type Token should have comment or be unexported (golint)
    • Line 20: warning: exported type Claims should have comment or be unexported (golint)
    • Line 25: warning: exported type Handler should have comment or be unexported (golint)
    • Line 31: warning: exported function New should have comment or be unexported (golint)
    • Line 36: warning: exported method Handler.GenToken should have comment or be unexported (golint)
    • Line 57: warning: exported method Handler.VerifyToken should have comment or be unexported (golint)
    • go-libs/stream/pipeline/handler/io.pipeline.handler.go
    • Line 5: warning: exported type Handler should have comment or be unexported (golint)
    • Line 10: warning: exported type Context should have comment or be unexported (golint)
    • Line 17: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 28: warning: exported method Context.RxLen should have comment or be unexported (golint)
    • Line 32: warning: exported method Context.TxLen should have comment or be unexported (golint)
    • Line 36: warning: exported method Context.RxWrite should have comment or be unexported (golint)
    • Line 41: warning: exported method Context.RxRead should have comment or be unexported (golint)
    • Line 51: warning: exported method Context.TxWrite should have comment or be unexported (golint)
    • Line 56: warning: exported method Context.TxRead should have comment or be unexported (golint)
    • go-libs/file/folder.go
    • Line 9: warning: exported function BuildPath should have comment or be unexported (golint)
    • Line 17: warning: exported function RemovePath should have comment or be unexported (golint)
    • Line 23: warning: exported function CreateFolder should have comment or be unexported (golint)
    • go-libs/codec/tlv/Tlv.go
    • Line 8: warning: exported type Tag should have comment or be unexported (golint)
    • Line 16: warning: exported type TagFrame should have comment or be unexported (golint)
    • Line 20: warning: exported function DecodeJson should have comment or be unexported (golint)
    • Line 33: warning: exported function DecodeToFrame should have comment or be unexported (golint)
    • Line 40: warning: exported function DecodeToJson should have comment or be unexported (golint)
    • Line 49: warning: exported function Encode should have comment or be unexported (golint)
    • go-libs/codec/tlv/tlv.util.go
    • Line 5: warning: exported function BytesToInt should have comment or be unexported (golint)
    • Line 16: warning: exported function StrToInt should have comment or be unexported (golint)
    • Line 20: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 25: warning: exported function IntToBytes should have comment or be unexported (golint)
    • Line 37: warning: exported function IntToString 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!