Preparing report...

Report for github.com/henrylee2cn/faygo

A+    Excellent!    Found 142 issues across 328 files

Tweet

gofmt91%

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!


gocyclo85%

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.

    • faygo/tree.go
    • Line 545: warning: cyclomatic complexity 47 of function (*node).findCaseInsensitivePathRec() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 34 of function (*node).getValue() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 27 of function (*node).addRoute() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 18 of function (*node).insertChild() is high (> 15) (gocyclo)
    • faygo/pongo2/variable.go
    • Line 229: warning: cyclomatic complexity 45 of function (*variableResolver).resolve() is high (> 15) (gocyclo)
    • Line 462: warning: cyclomatic complexity 27 of function (*Parser).parseVariableOrLiteral() is high (> 15) (gocyclo)
    • faygo/fs.go
    • Line 524: warning: cyclomatic complexity 20 of function (*FileServerManager).serveContent() is high (> 15) (gocyclo)
    • Line 945: warning: cyclomatic complexity 16 of function parseRange() is high (> 15) (gocyclo)
    • Line 132: warning: cyclomatic complexity 16 of function (*FileServerManager).OpenFS() is high (> 15) (gocyclo)
    • faygo/apiware/paramapi.go
    • Line 138: warning: cyclomatic complexity 47 of function (*ParamsAPI).addFields() is high (> 15) (gocyclo)
    • Line 451: warning: cyclomatic complexity 45 of function (*ParamsAPI).BindFields() is high (> 15) (gocyclo)
    • faygo/ext/websocket/conn.go
    • Line 684: warning: cyclomatic complexity 39 of function (*Conn).advanceFrame() is high (> 15) (gocyclo)
    • Line 470: warning: cyclomatic complexity 17 of function (*messageWriter).flushFrame() is high (> 15) (gocyclo)
    • faygo/markdown/markdown.go
    • Line 633: warning: cyclomatic complexity 46 of function scanLinkRef() is high (> 15) (gocyclo)
    • Line 534: warning: cyclomatic complexity 33 of function isReference() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 17 of function firstPass() is high (> 15) (gocyclo)
    • faygo/tree_test.go
    • Line 479: warning: cyclomatic complexity 19 of function TestTreeFindCaseInsensitivePath() is high (> 15) (gocyclo)
    • faygo/pongo2/parser_expression.go
    • Line 156: warning: cyclomatic complexity 20 of function (*relationalExpression).Evaluate() is high (> 15) (gocyclo)
    • Line 201: warning: cyclomatic complexity 17 of function (*simpleExpression).Evaluate() is high (> 15) (gocyclo)
    • faygo/muxapi.go
    • Line 327: warning: cyclomatic complexity 18 of function (*MuxAPI).comb() is high (> 15) (gocyclo)
    • faygo/markdown/inline.go
    • Line 202: warning: cyclomatic complexity 98 of function link() is high (> 15) (gocyclo)
    • Line 689: warning: cyclomatic complexity 36 of function autoLink() is high (> 15) (gocyclo)
    • Line 957: warning: cyclomatic complexity 33 of function helperFindEmphChar() is high (> 15) (gocyclo)
    • Line 844: warning: cyclomatic complexity 31 of function tagLength() is high (> 15) (gocyclo)
    • Line 69: warning: cyclomatic complexity 18 of function emphasis() is high (> 15) (gocyclo)
    • faygo/freecache/server/main.go
    • Line 175: warning: cyclomatic complexity 16 of function (*Session).readLoop() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 16 of function (*Server).ReadClient() is high (> 15) (gocyclo)
    • faygo/framework.go
    • Line 588: warning: cyclomatic complexity 17 of function (*Framework).tryHandle() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 16 of function (*Framework).build() is high (> 15) (gocyclo)
    • faygo/markdown/block.go
    • Line 1091: warning: cyclomatic complexity 49 of function (*parser).listItem() is high (> 15) (gocyclo)
    • Line 741: warning: cyclomatic complexity 29 of function (*parser).tableHeader() is high (> 15) (gocyclo)
    • Line 1302: warning: cyclomatic complexity 29 of function (*parser).paragraph() is high (> 15) (gocyclo)
    • Line 559: warning: cyclomatic complexity 29 of function (*parser).isFencedCode() is high (> 15) (gocyclo)
    • Line 24: warning: cyclomatic complexity 24 of function (*parser).block() is high (> 15) (gocyclo)
    • Line 208: warning: cyclomatic complexity 21 of function (*parser).prefixHeader() is high (> 15) (gocyclo)
    • Line 299: warning: cyclomatic complexity 19 of function (*parser).html() is high (> 15) (gocyclo)
    • faygo/markdown/smartypants.go
    • Line 307: warning: cyclomatic complexity 29 of function smartNumber() is high (> 15) (gocyclo)
    • Line 42: warning: cyclomatic complexity 27 of function smartQuoteHelper() is high (> 15) (gocyclo)
    • Line 110: warning: cyclomatic complexity 22 of function smartSingleQuote() is high (> 15) (gocyclo)
    • Line 265: warning: cyclomatic complexity 19 of function smartNumberGeneric() is high (> 15) (gocyclo)

golint74%

Golint is a linter for Go source code.

    • faygo/pongo2/parser.go
    • Line 8: warning: exported type INode should have comment or be unexported (golint)
    • Line 12: warning: exported type IEvaluator should have comment or be unexported (golint)
    • Line 19: warning: comment on exported type Parser should be of the form "Parser ..." (with optional leading article) (golint)
    • Line 59: warning: comment on exported method Parser.ConsumeN should be of the form "ConsumeN ..." (golint)
    • Line 64: warning: comment on exported method Parser.Current should be of the form "Current ..." (golint)
    • Line 69: warning: comment on exported method Parser.MatchType should be of the form "MatchType ..." (golint)
    • Line 79: warning: comment on exported method Parser.Match should be of the form "Match ..." (golint)
    • Line 89: warning: comment on exported method Parser.MatchOne should be of the form "MatchOne ..." (golint)
    • Line 102: warning: comment on exported method Parser.PeekType should be of the form "PeekType ..." (golint)
    • Line 108: warning: comment on exported method Parser.Peek should be of the form "Peek ..." (golint)
    • Line 114: warning: comment on exported method Parser.PeekOne should be of the form "PeekOne ..." (golint)
    • Line 127: warning: comment on exported method Parser.PeekN should be of the form "PeekN ..." (golint)
    • Line 140: warning: comment on exported method Parser.PeekTypeN should be of the form "PeekTypeN ..." (golint)
    • Line 152: warning: comment on exported method Parser.Remaining should be of the form "Remaining ..." (golint)
    • Line 157: warning: comment on exported method Parser.Count should be of the form "Count ..." (golint)
    • Line 162: warning: comment on exported method Parser.Get should be of the form "Get ..." (golint)
    • Line 170: warning: comment on exported method Parser.GetR should be of the form "GetR ..." (golint)
    • Line 208: warning: comment on exported method Parser.WrapUntilTag should be of the form "WrapUntilTag ..." (golint)
    • Line 267: warning: comment on exported method Parser.SkipUntilTag should be of the form "SkipUntilTag ..." (golint)
    • faygo/ext/barcode/barcode.go
    • Line 5: warning: comment on exported type Metadata should be of the form "Metadata ..." (with optional leading article) (golint)
    • Line 13: warning: comment on exported type Barcode should be of the form "Barcode ..." (with optional leading article) (golint)
    • faygo/freecache/murmur3/murmur_test.go
    • Line 31: warning: don't use underscores in Go names; var h32_byte should be h32Byte (golint)
    • Line 48: warning: don't use underscores in Go names; var h64_byte should be h64Byte (golint)
    • Line 65: warning: don't use underscores in Go names; var h128_byte should be h128Byte (golint)
    • faygo/ext/db/directsqlx/sqlhandle.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 321: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 365: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 418: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 518: warning: comment on exported function DirectSQLReloadAll should be of the form "DirectSQLReloadAll ..." (golint)
    • Line 526: warning: comment on exported function DirectSQLReloadModel should be of the form "DirectSQLReloadModel ..." (golint)
    • faygo/ext/db/directsqlx/sqlwatcher.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: comment on exported method TModels.StartWatcher should be of the form "StartWatcher ..." (golint)
    • Line 73: warning: comment on exported method TModels.StopWatcher should be of the form "StopWatcher ..." (golint)
    • faygo/samples/directsqlx/common/pongo2func.go
    • Line 1: warning: package comment should be of the form "Package common ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 18: warning: comment on exported function SimpleData should be of the form "SimpleData ..." (golint)
    • Line 44: warning: comment on exported function SimpleData2 should be of the form "SimpleData2 ..." (golint)
    • Line 69: warning: exported function Test should have comment or be unexported (golint)
    • faygo/ext/db/directsql/sqlservice.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 33: warning: comment on exported function DealwithParameter should be of the form "DealwithParameter ..." (golint)
    • Line 48: warning: comment on exported function SelectMapToRows should be of the form "SelectMapToRows ..." (golint)
    • Line 64: warning: exported function SelectMapIsExist should have comment or be unexported (golint)
    • Line 81: warning: comment on exported function SelectMapToMap should be of the form "SelectMapToMap ..." (golint)
    • Line 91: warning: comment on exported function SelectMapToStruct should be of the form "SelectMapToStruct ..." (golint)
    • Line 119: warning: comment on exported function SelectMapToStructPro should be of the form "SelectMapToStructPro ..." (golint)
    • Line 124: warning: comment on exported function MultiSelectMapToRows should be of the form "MultiSelectMapToRows ..." (golint)
    • Line 152: warning: comment on exported type PagingSelectRows should be of the form "PagingSelectRows ..." (with optional leading article) (golint)
    • Line 158: warning: comment on exported function PagingSelectMapToMap should be of the form "PagingSelectMapToMap ..." (golint)
    • Line 191: warning: comment on exported function PagingSelectMapToRows should be of the form "PagingSelectMapToRows ..." (golint)
    • Line 219: warning: comment on exported function MultiSelectMapToMap should be of the form "MultiSelectMapToMap ..." (golint)
    • Line 236: warning: comment on exported function ExecMap should be of the form "ExecMap ..." (golint)
    • Line 260: warning: comment on exported function ExecStruct should be of the form "ExecStruct ..." (golint)
    • Line 284: warning: comment on exported function BacthExecMap should be of the form "BacthExecMap ..." (golint)
    • Line 306: warning: comment on exported function BacthMultiExecMap should be of the form "BacthMultiExecMap ..." (golint)
    • faygo/session/ssdb/sess_ssdb.go
    • Line 19: warning: exported type SsdbProvider should have comment or be unexported (golint)
    • Line 38: warning: exported method SsdbProvider.SessionInit should have comment or be unexported (golint)
    • Line 54: warning: exported method SsdbProvider.SessionRead should have comment or be unexported (golint)
    • Line 77: warning: exported method SsdbProvider.SessionExist should have comment or be unexported (golint)
    • Line 93: warning: exported method SsdbProvider.SessionRegenerate should have comment or be unexported (golint)
    • Line 125: warning: exported method SsdbProvider.SessionDestroy should have comment or be unexported (golint)
    • Line 138: warning: exported method SsdbProvider.SessionGC should have comment or be unexported (golint)
    • Line 142: warning: exported method SsdbProvider.SessionAll should have comment or be unexported (golint)
    • Line 146: warning: exported type SessionStore should have comment or be unexported (golint)
    • Line 154: warning: exported method SessionStore.Set should have comment or be unexported (golint)
    • Line 160: warning: exported method SessionStore.Get should have comment or be unexported (golint)
    • Line 169: warning: exported method SessionStore.Delete should have comment or be unexported (golint)
    • Line 175: warning: exported method SessionStore.Flush should have comment or be unexported (golint)
    • Line 181: warning: exported method SessionStore.SessionID should have comment or be unexported (golint)
    • Line 185: warning: exported method SessionStore.SessionRelease should have comment or be unexported (golint)
    • faygo/markdown/markdown.go
    • Line 16: warning: package comment should be of the form "Package markdown ..." (golint)
    • Line 28: warning: comment on exported const VERSION should be of the form "VERSION ..." (golint)
    • Line 306: warning: comment on exported function MarkdownCommon should be of the form "MarkdownCommon ..." (golint)
    • faygo/pongo2/parser_expression.go
    • Line 8: warning: exported type Expression should have comment or be unexported (golint)
    • Line 43: warning: exported method Expression.FilterApplied should have comment or be unexported (golint)
    • Line 68: warning: exported method Expression.GetPositionToken should have comment or be unexported (golint)
    • Line 88: warning: exported method Expression.Execute should have comment or be unexported (golint)
    • Line 133: warning: exported method Expression.Evaluate should have comment or be unexported (golint)
    • Line 464: warning: exported method Parser.ParseExpression should have comment or be unexported (golint)
    • faygo/ext/bitconv/bitconv.go
    • Line 10: warning: exported type Bytes should have comment or be unexported (golint)
    • Line 15: warning: exported const B should have comment (or a comment on this block) or be unexported (golint)
    • faygo/ext/db/directsql/sqlhelper.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 32: warning: comment on exported function SplitRight should be of the form "SplitRight ..." (golint)
    • Line 208: warning: comment on exported function JSONString should be of the form "JSONString ..." (golint)
    • Line 354: warning: comment on exported function Struct2Map should be of the form "Struct2Map ..." (golint)
    • Line 366: warning: comment on exported function Map2Struct should be of the form "Map2Struct ..." (golint)
    • faygo/apiware/util.go
    • Line 73: warning: exported type KV should have comment or be unexported (golint)
    • Line 76: warning: exported type Map should have comment or be unexported (golint)
    • Line 79: warning: exported method Map.Get should have comment or be unexported (golint)
    • faygo/pongo2/filters.go
    • Line 7: warning: exported type FilterFunction should have comment or be unexported (golint)
    • Line 15: warning: comment on exported function RegisterFilter should be of the form "RegisterFilter ..." (golint)
    • Line 30: warning: comment on exported function ReplaceFilter should be of the form "ReplaceFilter ..." (golint)
    • Line 40: warning: comment on exported function MustApplyFilter should be of the form "MustApplyFilter ..." (golint)
    • Line 49: warning: comment on exported function ApplyFilter should be of the form "ApplyFilter ..." (golint)
    • faygo/ext/db/directsql/sqlengine.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 47: warning: comment on exported type PagingSelectResult should be of the form "PagingSelectResult ..." (with optional leading article) (golint)
    • Line 123: warning: comment on exported type Execresult should be of the form "Execresult ..." (with optional leading article) (golint)
    • faygo/pongo2/value.go
    • Line 11: warning: exported type Value should have comment or be unexported (golint)
    • Line 43: warning: comment on exported method Value.IsString should be of the form "IsString ..." (golint)
    • Line 48: warning: comment on exported method Value.IsBool should be of the form "IsBool ..." (golint)
    • Line 53: warning: comment on exported method Value.IsFloat should be of the form "IsFloat ..." (golint)
    • Line 59: warning: comment on exported method Value.IsInteger should be of the form "IsInteger ..." (golint)
    • Line 73: warning: comment on exported method Value.IsNumber should be of the form "IsNumber ..." (golint)
    • Line 79: warning: comment on exported method Value.IsNil should be of the form "IsNil ..." (golint)
    • Line 127: warning: comment on exported method Value.Integer should be of the form "Integer ..." (golint)
    • Line 151: warning: comment on exported method Value.Float should be of the form "Float ..." (golint)
    • Line 175: warning: comment on exported method Value.Bool should be of the form "Bool ..." (golint)
    • Line 188: warning: comment on exported method Value.IsTrue should be of the form "IsTrue ..." (golint)
    • Line 220: warning: comment on exported method Value.Negate should be of the form "Negate ..." (golint)
    • Line 251: warning: comment on exported method Value.Len should be of the form "Len ..." (golint)
    • Line 266: warning: comment on exported method Value.Slice should be of the form "Slice ..." (golint)
    • Line 281: warning: comment on exported method Value.Index should be of the form "Index ..." (golint)
    • Line 346: warning: comment on exported method Value.CanSlice should be of the form "CanSlice ..." (golint)
    • Line 356: warning: comment on exported method Value.Iterate should be of the form "Iterate ..." (golint)
    • Line 370: warning: comment on exported method Value.IterateOrder should be of the form "IterateOrder ..." (golint)
    • Line 458: warning: comment on exported method Value.Interface should be of the form "Interface ..." (golint)
    • Line 466: warning: comment on exported method Value.EqualValueTo should be of the form "EqualValueTo ..." (golint)
    • faygo/ext/barcode/utils/gfpoly.go
    • Line 3: warning: exported type GFPoly should have comment or be unexported (golint)
    • Line 8: warning: exported method GFPoly.Degree should have comment or be unexported (golint)
    • Line 12: warning: exported method GFPoly.Zero should have comment or be unexported (golint)
    • Line 21: warning: exported method GFPoly.AddOrSubstract should have comment or be unexported (golint)
    • Line 41: warning: exported method GFPoly.MultByMonominal should have comment or be unexported (golint)
    • Line 53: warning: exported method GFPoly.Multiply should have comment or be unexported (golint)
    • Line 72: warning: exported method GFPoly.Divide should have comment or be unexported (golint)
    • Line 89: warning: exported function NewMonominalPoly should have comment or be unexported (golint)
    • Line 98: warning: exported function NewGFPoly should have comment or be unexported (golint)
    • faygo/ext/cron/parser.go
    • Line 11: warning: comment on exported type ParseOption should be of the form "ParseOption ..." (with optional leading article) (golint)
    • Line 18: warning: exported const Second should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: comment on exported type Parser should be of the form "Parser ..." (with optional leading article) (golint)
    • Line 52: warning: comment on exported function NewParser should be of the form "NewParser ..." (golint)
    • faygo/ext/surfer/surfer.go
    • Line 26: warning: package comment should be of the form "Package surfer ..." (golint)
    • Line 69: warning: don't use underscores in Go names; var once_surf should be onceSurf (golint)
    • Line 70: warning: don't use underscores in Go names; var once_phantom should be oncePhantom (golint)
    • faygo/pongo2/lexer.go
    • Line 10: warning: exported const TokenError should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: comment on exported var TokenSymbols should be of the form "TokenSymbols ..." (golint)
    • Line 39: warning: comment on exported var TokenKeywords should be of the form "TokenKeywords ..." (golint)
    • Line 43: warning: exported type TokenType should have comment or be unexported (golint)
    • Line 44: warning: exported type Token should have comment or be unexported (golint)
    • faygo/pongo2/tags.go
    • Line 26: warning: exported type INodeTag should have comment or be unexported (golint)
    • Line 30: warning: comment on exported type TagParser should be of the form "TagParser ..." (with optional leading article) (golint)
    • Line 56: warning: comment on exported function RegisterTag should be of the form "RegisterTag ..." (golint)
    • Line 74: warning: comment on exported function ReplaceTag should be of the form "ReplaceTag ..." (golint)
    • faygo/pongo2/template.go
    • Line 9: warning: exported type TemplateWriter should have comment or be unexported (golint)
    • Line 26: warning: exported type Template should have comment or be unexported (golint)
    • Line 149: warning: comment on exported method Template.ExecuteWriter should be of the form "ExecuteWriter ..." (golint)
    • Line 164: warning: comment on exported method Template.ExecuteWriterUnbuffered should be of the form "ExecuteWriterUnbuffered ..." (golint)
    • Line 173: warning: comment on exported method Template.ExecuteBytes should be of the form "ExecuteBytes ..." (golint)
    • Line 183: warning: comment on exported method Template.Execute should be of the form "Execute ..." (golint)
    • faygo/freecache/server/main.go
    • Line 22: warning: error var protocolErr should have name of the form errFoo (golint)
    • Line 23: warning: exported var CRLF should have comment or be unexported (golint)
    • Line 39: warning: exported type Request should have comment or be unexported (golint)
    • Line 44: warning: exported method Request.Reset should have comment or be unexported (golint)
    • Line 54: warning: exported type Session should have comment or be unexported (golint)
    • Line 62: warning: exported type Server should have comment or be unexported (golint)
    • Line 66: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 72: warning: exported method Server.Start should have comment or be unexported (golint)
    • Line 116: warning: exported method Server.ReadClient should have comment or be unexported (golint)
    • faygo/freecache/murmur3/murmur128.go
    • Line 21: warning: comment on exported type Hash128 should be of the form "Hash128 ..." (with optional leading article) (golint)
    • Line 34: warning: exported function New128 should have comment or be unexported (golint)
    • faygo/ext/db/directsqlx/resultcache.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 24: warning: comment on exported type MemoPool should be of the form "MemoPool ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported function GetCache should be of the form "GetCache ..." (golint)
    • Line 51: warning: comment on exported function SetCache should be of the form "SetCache ..." (golint)
    • Line 88: warning: comment on exported function RemoveCache should be of the form "RemoveCache ..." (golint)
    • Line 95: warning: comment on exported function ClearCache should be of the form "ClearCache ..." (golint)
    • Line 98: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • faygo/ext/db/directsql/checkparameter.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 32: warning: comment on exported function IsEmail should be of the form "IsEmail ..." (golint)
    • Line 37: warning: comment on exported function IsInt should be of the form "IsInt ..." (golint)
    • Line 45: warning: comment on exported function IsFloat should be of the form "IsFloat ..." (golint)
    • Line 51: warning: comment on exported function IsVaildLength should be of the form "IsVaildLength ..." (golint)
    • Line 65: warning: comment on exported function IsVaildValue should be of the form "IsVaildValue ..." (golint)
    • Line 81: warning: comment on exported function IsVaildDatetime should be of the form "IsVaildDatetime ..." (golint)
    • Line 87: warning: comment on exported function IsVaildDate should be of the form "IsVaildDate ..." (golint)
    • Line 93: warning: comment on exported function CheckRequired should be of the form "CheckRequired ..." (golint)
    • faygo/ext/db/directsql/snowflake.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 33: warning: comment on exported type Worker should be of the form "Worker ..." (with optional leading article) (golint)
    • Line 64: warning: comment on exported method Worker.GetInt64Id should be of the form "GetInt64Id ..." (golint)
    • Line 93: warning: comment on exported method Worker.GetShortStrId should be of the form "GetShortStrId ..." (golint)
    • faygo/ext/uuid/uuid.go
    • Line 63: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 93: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • faygo/samples/directsql/common/pongo2func.go
    • Line 1: warning: package comment should be of the form "Package common ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: comment on exported function SimpleData should be of the form "SimpleData ..." (golint)
    • Line 43: warning: comment on exported function SimpleData2 should be of the form "SimpleData2 ..." (golint)
    • Line 68: warning: exported function Test should have comment or be unexported (golint)
    • faygo/ext/cron/cron.go
    • Line 89: warning: comment on exported type FuncJob should be of the form "FuncJob ..." (with optional leading article) (golint)
    • Line 92: warning: exported method FuncJob.Run should have comment or be unexported (golint)
    • faygo/ext/db/directsqlx/sqlengine.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 43: warning: comment on exported type PagingSelectResult should be of the form "PagingSelectResult ..." (with optional leading article) (golint)
    • Line 119: warning: comment on exported type Execresult should be of the form "Execresult ..." (with optional leading article) (golint)
    • faygo/ext/db/directsql/sqlcontext.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 37: warning: comment on exported function RegAny should be of the form "RegAny ..." (golint)
    • Line 41: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • faygo/ext/db/directsql/sqlmanage.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 41: warning: comment on exported const MSCONFIGFILE should be of the form "MSCONFIGFILE ..." (golint)
    • Line 44: warning: comment on exported type TModels should be of the form "TModels ..." (with optional leading article) (golint)
    • Line 62: warning: comment on exported type TModel should be of the form "TModel ..." (with optional leading article) (golint)
    • Line 77: warning: comment on exported type TSql should be of the form "TSql ..." (with optional leading article) (golint)
    • Line 101: warning: comment on exported type TSqltype should be of the form "TSqltype ..." (with optional leading article) (golint)
    • Line 105: warning: exported const ST_SELECT should have comment (or a comment on this block) or be unexported (golint)
    • Line 135: warning: comment on exported type TParaType should be of the form "TParaType ..." (with optional leading article) (golint)
    • Line 139: warning: exported const PT_STRING should have comment (or a comment on this block) or be unexported (golint)
    • Line 148: warning: comment on exported type TDefaultType should be of the form "TDefaultType ..." (with optional leading article) (golint)
    • Line 153: warning: exported const DT_UNDEFINED should have comment (or a comment on this block) or be unexported (golint)
    • Line 471: warning: comment on exported function GetSqlType should be of the form "GetSqlType ..." (golint)
    • Line 488: warning: comment on exported function ReloadAll should be of the form "ReloadAll ..." (golint)
    • Line 495: warning: comment on exported function ReloadModel should be of the form "ReloadModel ..." (golint)
    • faygo/logging/color/color.go
    • Line 120: warning: exported type Color should have comment or be unexported (golint)
    • Line 140: warning: exported method Color.Black should have comment or be unexported (golint)
    • Line 144: warning: exported method Color.Red should have comment or be unexported (golint)
    • Line 148: warning: exported method Color.Green should have comment or be unexported (golint)
    • Line 152: warning: exported method Color.Yellow should have comment or be unexported (golint)
    • Line 156: warning: exported method Color.Blue should have comment or be unexported (golint)
    • Line 160: warning: exported method Color.Magenta should have comment or be unexported (golint)
    • Line 164: warning: exported method Color.Cyan should have comment or be unexported (golint)
    • Line 168: warning: exported method Color.White should have comment or be unexported (golint)
    • Line 172: warning: exported method Color.Grey should have comment or be unexported (golint)
    • Line 176: warning: exported method Color.BlackBg should have comment or be unexported (golint)
    • Line 180: warning: exported method Color.RedBg should have comment or be unexported (golint)
    • Line 184: warning: exported method Color.GreenBg should have comment or be unexported (golint)
    • Line 188: warning: exported method Color.YellowBg should have comment or be unexported (golint)
    • Line 192: warning: exported method Color.BlueBg should have comment or be unexported (golint)
    • Line 196: warning: exported method Color.MagentaBg should have comment or be unexported (golint)
    • Line 200: warning: exported method Color.CyanBg should have comment or be unexported (golint)
    • Line 204: warning: exported method Color.WhiteBg should have comment or be unexported (golint)
    • Line 208: warning: exported method Color.Reset should have comment or be unexported (golint)
    • Line 212: warning: exported method Color.Bold should have comment or be unexported (golint)
    • Line 216: warning: exported method Color.Dim should have comment or be unexported (golint)
    • Line 220: warning: exported method Color.Italic should have comment or be unexported (golint)
    • Line 224: warning: exported method Color.Underline should have comment or be unexported (golint)
    • Line 228: warning: exported method Color.Inverse should have comment or be unexported (golint)
    • Line 232: warning: exported method Color.Hidden should have comment or be unexported (golint)
    • Line 236: warning: exported method Color.Strikeout should have comment or be unexported (golint)
    • Line 240: warning: exported function Disable should have comment or be unexported (golint)
    • Line 244: warning: exported function Enable should have comment or be unexported (golint)
    • Line 248: warning: exported function Black should have comment or be unexported (golint)
    • Line 252: warning: exported function Red should have comment or be unexported (golint)
    • Line 256: warning: exported function Green should have comment or be unexported (golint)
    • Line 260: warning: exported function Yellow should have comment or be unexported (golint)
    • Line 264: warning: exported function Blue should have comment or be unexported (golint)
    • Line 268: warning: exported function Magenta should have comment or be unexported (golint)
    • Line 272: warning: exported function Cyan should have comment or be unexported (golint)
    • Line 276: warning: exported function White should have comment or be unexported (golint)
    • Line 280: warning: exported function Grey should have comment or be unexported (golint)
    • Line 284: warning: exported function BlackBg should have comment or be unexported (golint)
    • Line 288: warning: exported function RedBg should have comment or be unexported (golint)
    • Line 292: warning: exported function GreenBg should have comment or be unexported (golint)
    • Line 296: warning: exported function YellowBg should have comment or be unexported (golint)
    • Line 300: warning: exported function BlueBg should have comment or be unexported (golint)
    • Line 304: warning: exported function MagentaBg should have comment or be unexported (golint)
    • Line 308: warning: exported function CyanBg should have comment or be unexported (golint)
    • Line 312: warning: exported function WhiteBg should have comment or be unexported (golint)
    • Line 316: warning: exported function Reset should have comment or be unexported (golint)
    • Line 320: warning: exported function Bold should have comment or be unexported (golint)
    • Line 324: warning: exported function Dim should have comment or be unexported (golint)
    • Line 328: warning: exported function Italic should have comment or be unexported (golint)
    • Line 332: warning: exported function Underline should have comment or be unexported (golint)
    • Line 336: warning: exported function Inverse should have comment or be unexported (golint)
    • Line 340: warning: exported function Hidden should have comment or be unexported (golint)
    • Line 344: warning: exported function Strikeout should have comment or be unexported (golint)
    • faygo/freecache/ringbuf.go
    • Line 10: warning: exported var ErrOutOfRange should have comment or be unexported (golint)
    • Line 12: warning: comment on exported type RingBuf should be of the form "RingBuf ..." (with optional leading article) (golint)
    • Line 22: warning: exported function NewRingBuf should have comment or be unexported (golint)
    • Line 30: warning: comment on exported method RingBuf.Dump should be of the form "Dump ..." (golint)
    • Line 41: warning: exported method RingBuf.Size should have comment or be unexported (golint)
    • Line 45: warning: exported method RingBuf.Begin should have comment or be unexported (golint)
    • Line 49: warning: exported method RingBuf.End should have comment or be unexported (golint)
    • Line 53: warning: comment on exported method RingBuf.ReadAt should be of the form "ReadAt ..." (golint)
    • Line 103: warning: exported method RingBuf.WriteAt should have comment or be unexported (golint)
    • Line 129: warning: exported method RingBuf.EqualAt should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 212: warning: exported method RingBuf.Resize should have comment or be unexported (golint)
    • Line 234: warning: exported method RingBuf.Skip should have comment or be unexported (golint)
    • faygo/ext/surfer/util.go
    • Line 72: 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)
    • faygo/ext/db/directsqlx/sqlhelper.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 33: warning: comment on exported function SplitRight should be of the form "SplitRight ..." (golint)
    • Line 59: warning: don't use underscores in Go names; var x_TIME_DEFAULT should be xTIMEDEFAULT (golint)
    • Line 215: warning: comment on exported function JSONString should be of the form "JSONString ..." (golint)
    • Line 361: warning: comment on exported function Struct2Map should be of the form "Struct2Map ..." (golint)
    • Line 373: warning: comment on exported function Map2Struct should be of the form "Map2Struct ..." (golint)
    • faygo/ext/db/directsqlx/sqlmanage.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 34: warning: comment on exported const MSCONFIGFILE should be of the form "MSCONFIGFILE ..." (golint)
    • Line 37: warning: comment on exported type TModels should be of the form "TModels ..." (with optional leading article) (golint)
    • Line 53: warning: comment on exported type TModel should be of the form "TModel ..." (with optional leading article) (golint)
    • Line 68: warning: comment on exported type TSql should be of the form "TSql ..." (with optional leading article) (golint)
    • Line 90: warning: comment on exported type TSqltype should be of the form "TSqltype ..." (with optional leading article) (golint)
    • Line 94: warning: exported const ST_SELECT should have comment (or a comment on this block) or be unexported (golint)
    • Line 124: warning: comment on exported type TParaType should be of the form "TParaType ..." (with optional leading article) (golint)
    • Line 128: warning: exported const PT_STRING should have comment (or a comment on this block) or be unexported (golint)
    • Line 137: warning: comment on exported type TDefaultType should be of the form "TDefaultType ..." (with optional leading article) (golint)
    • Line 142: warning: exported const DT_UNDEFINED should have comment (or a comment on this block) or be unexported (golint)
    • Line 441: warning: comment on exported function GetSqlType should be of the form "GetSqlType ..." (golint)
    • Line 458: warning: comment on exported function ReloadAll should be of the form "ReloadAll ..." (golint)
    • Line 465: warning: comment on exported function ReloadModel should be of the form "ReloadModel ..." (golint)
    • faygo/ext/db/directsqlx/sqlservice.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 30: warning: comment on exported function DealwithParameter should be of the form "DealwithParameter ..." (golint)
    • Line 45: warning: comment on exported function SelectMapToRows should be of the form "SelectMapToRows ..." (golint)
    • Line 59: warning: comment on exported function SelectMapToMap should be of the form "SelectMapToMap ..." (golint)
    • Line 69: warning: comment on exported function SelectMapToStruct should be of the form "SelectMapToStruct ..." (golint)
    • Line 97: warning: comment on exported function SelectMapToStructPro should be of the form "SelectMapToStructPro ..." (golint)
    • Line 102: warning: comment on exported function MultiSelectMapToRows should be of the form "MultiSelectMapToRows ..." (golint)
    • Line 130: warning: comment on exported type PagingSelectRows should be of the form "PagingSelectRows ..." (with optional leading article) (golint)
    • Line 136: warning: comment on exported function PagingSelectMapToMap should be of the form "PagingSelectMapToMap ..." (golint)
    • Line 168: warning: comment on exported function PagingSelectMapToRows should be of the form "PagingSelectMapToRows ..." (golint)
    • Line 195: warning: comment on exported function MultiSelectMapToMap should be of the form "MultiSelectMapToMap ..." (golint)
    • Line 212: warning: comment on exported function ExecMap should be of the form "ExecMap ..." (golint)
    • Line 236: warning: comment on exported function ExecStruct should be of the form "ExecStruct ..." (golint)
    • Line 260: warning: comment on exported function BacthExecMap should be of the form "BacthExecMap ..." (golint)
    • Line 282: warning: comment on exported function BacthMultiExecMap should be of the form "BacthMultiExecMap ..." (golint)
    • faygo/freecache/cache.go
    • Line 11: warning: exported type Cache should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function NewCache should be of the form "NewCache ..." (golint)
    • Line 37: warning: comment on exported method Cache.Set should be of the form "Set ..." (golint)
    • Line 64: warning: exported method Cache.Del should have comment or be unexported (golint)
    • Line 73: warning: exported method Cache.SetInt should have comment or be unexported (golint)
    • Line 79: warning: exported method Cache.GetInt should have comment or be unexported (golint)
    • Line 85: warning: exported method Cache.DelInt should have comment or be unexported (golint)
    • Line 91: warning: exported method Cache.EvacuateCount should have comment or be unexported (golint)
    • Line 98: warning: exported method Cache.ExpiredCount should have comment or be unexported (golint)
    • Line 105: warning: exported method Cache.EntryCount should have comment or be unexported (golint)
    • Line 112: warning: comment on exported method Cache.AverageAccessTime should be of the form "AverageAccessTime ..." (golint)
    • Line 123: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 128: warning: exported method Cache.HitCount should have comment or be unexported (golint)
    • Line 132: warning: exported method Cache.LookupCount should have comment or be unexported (golint)
    • Line 136: warning: exported method Cache.HitRate should have comment or be unexported (golint)
    • Line 140: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 145: warning: exported method Cache.OverwriteCount should have comment or be unexported (golint)
    • Line 152: warning: exported method Cache.Clear should have comment or be unexported (golint)
    • Line 163: warning: exported method Cache.ResetStatistics should have comment or be unexported (golint)
    • faygo/freecache/segment.go
    • Line 9: warning: exported const HASH_ENTRY_SIZE should have comment or be unexported (golint)
    • Line 10: warning: exported const ENTRY_HDR_SIZE should have comment or be unexported (golint)
    • Line 12: warning: exported var ErrLargeKey should have comment or be unexported (golint)
    • Line 13: warning: exported var ErrLargeEntry should have comment or be unexported (golint)
    • Line 14: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • faygo/server.go
    • Line 69: warning: don't use underscores in Go names; const __netTypes__ should be _NetTypes (golint)
    • Line 112: warning: receiver name s should be consistent with previous receiver name server for Server (golint)
    • faygo/ext/otp/otp.go
    • Line 36: warning: comment on exported var ErrValidateSecretInvalidBase32 should be of the form "ErrValidateSecretInvalidBase32 ..." (golint)
    • Line 39: warning: comment on exported var ErrValidateInputInvalidLength6 should be of the form "ErrValidateInputInvalidLength6 ..." (golint)
    • Line 42: warning: comment on exported var ErrValidateInputInvalidLength8 should be of the form "ErrValidateInputInvalidLength8 ..." (golint)
    • Line 45: warning: comment on exported var ErrGenerateMissingIssuer should be of the form "ErrGenerateMissingIssuer ..." (golint)
    • Line 48: warning: comment on exported var ErrGenerateMissingAccountName should be of the form "ErrGenerateMissingAccountName ..." (golint)
    • Line 147: warning: exported const AlgorithmSHA1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 167: warning: exported method Algorithm.Hash should have comment or be unexported (golint)
    • Line 186: warning: exported const DigitsSix should have comment (or a comment on this block) or be unexported (golint)
    • faygo/pongo2/context.go
    • Line 86: warning: exported function NewChildExecutionContext should have comment or be unexported (golint)
    • Line 123: warning: exported method ExecutionContext.Logf should have comment or be unexported (golint)
    • faygo/ext/barcode/qr/helper.go
    • Line 24: warning: comment on exported function Img should be of the form "Img ..." (golint)
    • Line 36: warning: comment on exported function Png should be of the form "Png ..." (golint)
    • Line 48: warning: comment on exported function Gif should be of the form "Gif ..." (golint)
    • Line 59: warning: comment on exported function Jpeg should be of the form "Jpeg ..." (golint)
    • faygo/ext/db/directsqlx/checkparameter.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 30: warning: comment on exported function IsEmail should be of the form "IsEmail ..." (golint)
    • Line 35: warning: comment on exported function IsInt should be of the form "IsInt ..." (golint)
    • Line 43: warning: comment on exported function IsFloat should be of the form "IsFloat ..." (golint)
    • Line 49: warning: comment on exported function IsVaildLength should be of the form "IsVaildLength ..." (golint)
    • Line 63: warning: comment on exported function IsVaildValue should be of the form "IsVaildValue ..." (golint)
    • Line 79: warning: comment on exported function IsVaildDatetime should be of the form "IsVaildDatetime ..." (golint)
    • Line 85: warning: comment on exported function IsVaildDate should be of the form "IsVaildDate ..." (golint)
    • Line 91: warning: comment on exported function CheckRequired should be of the form "CheckRequired ..." (golint)
    • faygo/ext/db/directsql/sqlhandle.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 320: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 364: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 417: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 517: warning: comment on exported function DirectSQLReloadAll should be of the form "DirectSQLReloadAll ..." (golint)
    • Line 525: warning: comment on exported function DirectSQLReloadModel should be of the form "DirectSQLReloadModel ..." (golint)
    • faygo/ext/db/directsql/sqlwatcher.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 17: warning: comment on exported method TModels.StartWatcher should be of the form "StartWatcher ..." (golint)
    • Line 73: warning: comment on exported method TModels.StopWatcher should be of the form "StopWatcher ..." (golint)
    • faygo/logging/color/colorable_others.go
    • Line 10: warning: exported function NewColorable should have comment or be unexported (golint)
    • Line 18: warning: exported function NewColorableStdout should have comment or be unexported (golint)
    • Line 22: warning: exported function NewColorableStderr should have comment or be unexported (golint)
    • faygo/doc.go
    • Line 1: warning: package comment should be of the form "Package faygo ..." (golint)
    • faygo/samples/demo/handler/render.go
    • Line 8: warning: exported type Render should have comment or be unexported (golint)
    • Line 14: warning: exported method Render.Serve should have comment or be unexported (golint)
    • Line 25: warning: exported function Index should have comment or be unexported (golint)
    • faygo/ext/uuid/time.go
    • Line 89: warning: comment on exported function SetClockSequence should be of the form "SetClockSequence ..." (golint)
    • Line 103: warning: don't use underscores in Go names; var old_seq should be oldSeq (golint)
    • faygo/ext/db/directsql/resultcache.go
    • Line 1: warning: package comment should be of the form "Package directsql ..." (golint)
    • Line 24: warning: comment on exported type MemoPool should be of the form "MemoPool ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported function GetCache should be of the form "GetCache ..." (golint)
    • Line 53: warning: comment on exported function SetCache should be of the form "SetCache ..." (golint)
    • Line 90: warning: comment on exported function RemoveCache should be of the form "RemoveCache ..." (golint)
    • Line 97: warning: comment on exported function ClearCache should be of the form "ClearCache ..." (golint)
    • Line 100: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • faygo/samples/demo/handler/proxy.go
    • Line 7: warning: exported type Search should have comment or be unexported (golint)
    • Line 9: warning: exported method Search.Serve should have comment or be unexported (golint)
    • Line 13: warning: exported method Search.Doc should have comment or be unexported (golint)
    • faygo/session/session.go
    • Line 85: warning: exported type ManagerConfig should have comment or be unexported (golint)
    • Line 276: warning: comment on exported method Manager.GetSessionStoreById should be of the form "GetSessionStoreById ..." (golint)
    • faygo/ext/db/directsqlx/sqlcontext.go
    • Line 1: warning: package comment should be of the form "Package directsqlx ..." (golint)
    • Line 37: warning: comment on exported function RegAny should be of the form "RegAny ..." (golint)
    • Line 41: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • faygo/pongo2/nodes_wrapper.go
    • Line 3: warning: exported type NodeWrapper should have comment or be unexported (golint)
    • Line 8: warning: exported method NodeWrapper.Execute 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.


misspell96%

Misspell Finds commonly misspelled English words

    • faygo/context.go
    • Line 110: warning: "manualy" is a misspelling of "manually" (misspell)
    • Line 127: warning: "registed" is a misspelling of "registered" (misspell)