Preparing report...

Report for github.com/pibigstar/go-demo

A+    Excellent!    Found 123 issues across 265 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!


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!


golint56%

Golint is a linter for Go source code.

    • go-demo/base/context/context.go
    • Line 47: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 63: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 77: warning: should not use basic type string as key in context.WithValue (golint)
    • go-demo/blockchain/core/block.go
    • Line 13: warning: exported type Block should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function GenerateNewBlock should be of the form "GenerateNewBlock ..." (golint)
    • Line 46: warning: comment on exported function GenerateGenesisBlock should be of the form "GenerateGenesisBlock ..." (golint)
    • go-demo/design/factory/abstract/abstract_factory.go
    • Line 9: warning: exported type Girl should have comment or be unexported (golint)
    • Line 13: warning: comment on exported type FatGirl should be of the form "FatGirl ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type ThinGirl should be of the form "ThinGirl ..." (with optional leading article) (golint)
    • Line 29: warning: exported type Factory should have comment or be unexported (golint)
    • Line 33: warning: comment on exported type ChineseGirlFactory should be of the form "ChineseGirlFactory ..." (with optional leading article) (golint)
    • Line 37: warning: exported method ChineseGirlFactory.CreateGirl should have comment or be unexported (golint)
    • Line 46: warning: comment on exported type AmericanGirlFactory should be of the form "AmericanGirlFactory ..." (with optional leading article) (golint)
    • Line 50: warning: exported method AmericanGirlFactory.CreateGirl should have comment or be unexported (golint)
    • Line 59: warning: comment on exported type AmericanFatGirl should be of the form "AmericanFatGirl ..." (with optional leading article) (golint)
    • Line 67: warning: comment on exported type AmericanThainGirl should be of the form "AmericanThainGirl ..." (with optional leading article) (golint)
    • Line 75: warning: comment on exported type GirlFactoryStore should be of the form "GirlFactoryStore ..." (with optional leading article) (golint)
    • go-demo/sdk/nsq/nsq.go
    • Line 17: warning: exported type Message should have comment or be unexported (golint)
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 32: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • Line 68: warning: exported function Publish should have comment or be unexported (golint)
    • Line 77: warning: exported function Consume should have comment or be unexported (golint)
    • Line 91: warning: exported function Close should have comment or be unexported (golint)
    • go-demo/utils/pool/routine.go
    • Line 9: warning: exported var Pool should have comment or be unexported (golint)
    • Line 11: warning: exported type GoPool should have comment or be unexported (golint)
    • Line 23: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 36: warning: exported method GoPool.Queue should have comment or be unexported (golint)
    • Line 48: warning: exported method GoPool.Go should have comment or be unexported (golint)
    • Line 52: warning: exported method GoPool.QueueWithArgs should have comment or be unexported (golint)
    • Line 64: warning: exported method GoPool.GoWithArgs should have comment or be unexported (golint)
    • Line 68: warning: exported method GoPool.Reset should have comment or be unexported (golint)
    • Line 72: warning: exported method GoPool.Cancel should have comment or be unexported (golint)
    • Line 76: warning: exported method GoPool.Close should have comment or be unexported (golint)
    • go-demo/utils/cmux/cmux.go
    • Line 61: warning: exported function EchoServer should have comment or be unexported (golint)
    • Line 76: warning: exported type ExampleRPCRcvr should have comment or be unexported (golint)
    • Line 78: warning: exported method ExampleRPCRcvr.Cube should have comment or be unexported (golint)
    • go-demo/utils/oauth2/client/main.go
    • Line 19: warning: comment on exported const StateValue should be of the form "StateValue ..." (golint)
    • Line 21: warning: exported const StateKey should have comment (or a comment on this block) or be unexported (golint)
    • go-demo/base/file/file_demo.go
    • Line 12: warning: comment on exported function ReadFile should be of the form "ReadFile ..." (golint)
    • Line 19: warning: comment on exported function ReadAllDir should be of the form "ReadAllDir ..." (golint)
    • Line 30: warning: comment on exported function WriteFile should be of the form "WriteFile ..." (golint)
    • Line 36: warning: comment on exported function AppendToFile should be of the form "AppendToFile ..." (golint)
    • Line 44: warning: comment on exported function CreateFile should be of the form "CreateFile ..." (golint)
    • Line 53: warning: comment on exported function MkOneDir should be of the form "MkOneDir ..." (golint)
    • Line 60: warning: comment on exported function MkAllDir should be of the form "MkAllDir ..." (golint)
    • Line 70: warning: comment on exported function DeleteFile should be of the form "DeleteFile ..." (golint)
    • Line 82: warning: exported function IsExist should have comment or be unexported (golint)
    • Line 93: warning: comment on exported function FileAbs should be of the form "FileAbs ..." (golint)
    • go-demo/sdk/rabbitmq/rabbitmq.go
    • Line 19: warning: comment on exported const RabbitURL should be of the form "RabbitURL ..." (golint)
    • Line 21: warning: comment on exported const TransExchangeName should be of the form "TransExchangeName ..." (golint)
    • Line 23: warning: comment on exported const TransOSSQueueName should be of the form "TransOSSQueueName ..." (golint)
    • Line 25: warning: comment on exported const TransOSSErrQueueName should be of the form "TransOSSErrQueueName ..." (golint)
    • Line 27: warning: comment on exported const TransOSSRoutingKey should be of the form "TransOSSRoutingKey ..." (golint)
    • go-demo/design/factory/simple/simple_factory.go
    • Line 7: warning: exported type Girl should have comment or be unexported (golint)
    • Line 11: warning: comment on exported type FatGirl should be of the form "FatGirl ..." (with optional leading article) (golint)
    • Line 19: warning: comment on exported type ThinGirl should be of the form "ThinGirl ..." (with optional leading article) (golint)
    • Line 27: warning: exported type GirlFactory should have comment or be unexported (golint)
    • Line 30: warning: exported method GirlFactory.CreateGirl should have comment or be unexported (golint)
    • go-demo/spider/gift/hand/get_gift.go
    • Line 13: warning: exported type Gift should have comment or be unexported (golint)
    • Line 19: warning: comment on exported const TryTime should be of the form "TryTime ..." (golint)
    • Line 21: warning: comment on exported const URL should be of the form "URL ..." (golint)
    • go-demo/base/json/json.go
    • Line 12: warning: exported function StructToJSON should have comment or be unexported (golint)
    • Line 17: warning: exported function JSONToStruct should have comment or be unexported (golint)
    • Line 21: warning: exported function MapToJSON should have comment or be unexported (golint)
    • Line 26: warning: exported function JSONToMap should have comment or be unexported (golint)
    • Line 30: warning: exported function MapToStruct should have comment or be unexported (golint)
    • Line 35: warning: exported function StructToMap should have comment or be unexported (golint)
    • Line 41: warning: comment on exported function MarshInterface should be of the form "MarshInterface ..." (golint)
    • Line 63: warning: comment on exported function FormatMarshal should be of the form "FormatMarshal ..." (golint)
    • Line 69: warning: comment on exported function MarshalUnEscapeHTML should be of the form "MarshalUnEscapeHTML ..." (golint)
    • go-demo/sdk/consul/consul.go
    • Line 23: warning: comment on exported function Register should be of the form "Register ..." (golint)
    • Line 47: warning: comment on exported function ReadConfig should be of the form "ReadConfig ..." (golint)
    • Line 60: warning: comment on exported function DeleteService should be of the form "DeleteService ..." (golint)
    • Line 65: warning: comment on exported function ListService should be of the form "ListService ..." (golint)
    • go-demo/base/trace/trace.go
    • Line 17: warning: exported function SleepSomeTime should have comment or be unexported (golint)
    • Line 41: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • go-demo/sdk/trace/app/db/db.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 13: warning: exported var DB should have comment or be unexported (golint)
    • Line 28: warning: exported function NewDB should have comment or be unexported (golint)
    • Line 43: warning: comment on exported function AddContext should be of the form "AddContext ..." (golint)
    • Line 143: warning: exported function Close should have comment or be unexported (golint)
    • go-demo/base/goroutine/pool/pool.go
    • Line 16: warning: exported const START should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Pool should have comment or be unexported (golint)
    • Line 35: warning: exported type Task should have comment or be unexported (golint)
    • Line 40: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 52: warning: comment on exported method Pool.Run should be of the form "Run ..." (golint)
    • Line 80: warning: exported method Pool.Put should have comment or be unexported (golint)
    • Line 91: warning: exported method Pool.Close should have comment or be unexported (golint)
    • go-demo/utils/stack/stack.go
    • Line 10: warning: comment on exported function GetStack should be of the form "GetStack ..." (golint)
    • Line 17: warning: comment on exported function GetStackSimple should be of the form "GetStackSimple ..." (golint)
    • Line 23: warning: comment on exported function GetStackFunc should be of the form "GetStackFunc ..." (golint)
    • Line 33: warning: comment on exported function GetGoFilePath should be of the form "GetGoFilePath ..." (golint)
    • go-demo/design/worker/worker.go
    • Line 8: warning: exported var JobQueue should have comment or be unexported (golint)
    • Line 10: warning: exported type Job should have comment or be unexported (golint)
    • Line 14: warning: exported type Worker should have comment or be unexported (golint)
    • Line 23: warning: exported function NewWorker should have comment or be unexported (golint)
    • Line 31: warning: exported method Worker.Start should have comment or be unexported (golint)
    • Line 47: warning: exported method Worker.Stop should have comment or be unexported (golint)
    • Line 53: warning: comment on exported type Dispatcher should be of the form "Dispatcher ..." (with optional leading article) (golint)
    • Line 59: warning: exported function NewDispatcher should have comment or be unexported (golint)
    • Line 64: warning: exported method Dispatcher.Run should have comment or be unexported (golint)
    • go-demo/sdk/mysql/mysql.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 27: warning: comment on exported function GetGormDB should be of the form "GetGormDB ..." (golint)
    • Line 34: warning: comment on exported function GetMySQLDB should be of the form "GetMySQLDB ..." (golint)
    • go-demo/utils/qrcode/terminal/qr_terminal.go
    • Line 10: warning: comment on exported function GenQrToTerminal should be of the form "GenQrToTerminal ..." (golint)
    • Line 15: warning: comment on exported function GenQrToTerminalWithConfig should be of the form "GenQrToTerminalWithConfig ..." (golint)
    • Line 27: warning: comment on exported function GenQR should be of the form "GenQR ..." (golint)
    • go-demo/design/observer/observer.go
    • Line 5: warning: comment on exported type Customer should be of the form "Customer ..." (with optional leading article) (golint)
    • Line 10: warning: exported type CustomerA should have comment or be unexported (golint)
    • Line 17: warning: exported type CustomerB should have comment or be unexported (golint)
    • Line 24: warning: comment on exported type NewsOffice should be of the form "NewsOffice ..." (with optional leading article) (golint)
    • go-demo/utils/retry/retry.go
    • Line 8: warning: comment on exported function Retry should be of the form "Retry ..." (golint)
    • Line 30: warning: exported type Stop should have comment or be unexported (golint)
    • Line 34: warning: exported function NoRetryError should have comment or be unexported (golint)
    • go-demo/design/proxy/proxy.go
    • Line 5: warning: exported type Seller should have comment or be unexported (golint)
    • Line 9: warning: comment on exported type Station should be of the form "Station ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported type StationProxy should be of the form "StationProxy ..." (with optional leading article) (golint)
    • go-demo/utils/metadata/metadata.go
    • Line 14: warning: exported const ContextMDTokenKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: comment on exported function GetTokenFromContext should be of the form "GetTokenFromContext ..." (golint)
    • go-demo/utils/robot/robot.go
    • Line 27: warning: comment on exported function ListenScreen should be of the form "ListenScreen ..." (golint)
    • Line 40: warning: comment on exported function ListenKeywords should be of the form "ListenKeywords ..." (golint)
    • Line 53: warning: comment on exported function PressKeywords should be of the form "PressKeywords ..." (golint)
    • Line 65: warning: comment on exported function ShowMessage should be of the form "ShowMessage ..." (golint)
    • Line 75: warning: comment on exported function FindAndKillProcess should be of the form "FindAndKillProcess ..." (golint)
    • go-demo/utils/xlsx/xlsx.go
    • Line 11: warning: exported type Record should have comment or be unexported (golint)
    • Line 16: warning: exported function RefactorWrite should have comment or be unexported (golint)
    • Line 55: warning: comment on exported function WriteXlsx should be of the form "WriteXlsx ..." (golint)
    • Line 71: warning: comment on exported function ReadXlsx should be of the form "ReadXlsx ..." (golint)
    • go-demo/utils/oauth2/server/main.go
    • Line 26: warning: exported const UserToken should have comment (or a comment on this block) or be unexported (golint)
    • Line 86: warning: exported function RunServer should have comment or be unexported (golint)
    • go-demo/blockchain/core/blockchain.go
    • Line 5: warning: exported type BlockChain should have comment or be unexported (golint)
    • Line 9: warning: comment on exported function NewBlockChain should be of the form "NewBlockChain ..." (golint)
    • Line 19: warning: comment on exported method BlockChain.SendData should be of the form "SendData ..." (golint)
    • Line 28: warning: comment on exported method BlockChain.AppendBlock should be of the form "AppendBlock ..." (golint)
    • go-demo/design/facade/facade.go
    • Line 5: warning: comment on exported type CPU should be of the form "CPU ..." (with optional leading article) (golint)
    • Line 13: warning: comment on exported type Memory should be of the form "Memory ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type Disk should be of the form "Disk ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported type StartBtn should be of the form "StartBtn ..." (with optional leading article) (golint)
    • go-demo/sdk/qq/qq_pc_login.go
    • Line 12: warning: exported const AppId should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type PrivateInfo should have comment or be unexported (golint)
    • Line 35: warning: comment on exported function GetAuthCode should be of the form "GetAuthCode ..." (golint)
    • Line 47: warning: comment on exported function GetToken should be of the form "GetToken ..." (golint)
    • Line 77: warning: comment on exported function GetOpenId should be of the form "GetOpenId ..." (golint)
    • Line 92: warning: comment on exported function GetUserInfo should be of the form "GetUserInfo ..." (golint)
    • go-demo/spider/qq/qq.go
    • Line 3: warning: exported type User should have comment or be unexported (golint)
    • Line 24: warning: exported type QQType should have comment or be unexported (golint)
    • Line 27: warning: exported const QQZone should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported method QQType.Referer should have comment or be unexported (golint)
    • Line 42: warning: exported method QQType.Title should have comment or be unexported (golint)
    • Line 53: warning: exported method QQType.TargetURL should have comment or be unexported (golint)
    • go-demo/utils/sentinel/init.go
    • Line 13: warning: exported const FlowPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type Config should have comment or be unexported (golint)
    • Line 21: warning: exported type Sentinel should have comment or be unexported (golint)
    • Line 27: warning: exported type FlowRule should have comment or be unexported (golint)
    • Line 35: warning: exported type BreakerRule should have comment or be unexported (golint)
    • Line 47: warning: comment on exported type SystemRule should be of the form "SystemRule ..." (with optional leading article) (golint)
    • go-demo/base/http/restful/restful.go
    • Line 11: warning: comment on exported type Person should be of the form "Person ..." (with optional leading article) (golint)
    • Line 19: warning: exported type Address should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function GetPerson should be of the form "GetPerson ..." (golint)
    • Line 38: warning: comment on exported function GetPeople should be of the form "GetPeople ..." (golint)
    • Line 43: warning: comment on exported function PostPerson should be of the form "PostPerson ..." (golint)
    • Line 53: warning: comment on exported function DeletePerson should be of the form "DeletePerson ..." (golint)
    • go-demo/sdk/sms/sms.go
    • Line 13: warning: exported var SmsClient should have comment or be unexported (golint)
    • Line 27: warning: exported type SMSContent should have comment or be unexported (golint)
    • go-demo/sdk/robot/robot.go
    • Line 13: warning: exported type Content should have comment or be unexported (golint)
    • Line 22: warning: exported type Markdown should have comment or be unexported (golint)
    • Line 27: warning: exported type ActionCard should have comment or be unexported (golint)
    • Line 37: warning: exported type Btn should have comment or be unexported (golint)
    • Line 46: warning: exported type Link should have comment or be unexported (golint)
    • Line 53: warning: exported type RobotMsg should have comment or be unexported (golint)
    • Line 62: warning: exported function Send should have comment or be unexported (golint)
    • go-demo/base/file/read_file.go
    • Line 14: warning: comment on exported function Copy should be of the form "Copy ..." (golint)
    • Line 32: warning: comment on exported function ReadAll should be of the form "ReadAll ..." (golint)
    • Line 51: warning: comment on exported function ReadBuf should be of the form "ReadBuf ..." (golint)
    • go-demo/sdk/nsq/nsqio/main.go
    • Line 22: warning: exported function HandleMessage should have comment or be unexported (golint)
    • Line 27: warning: comment on exported function Producer should be of the form "Producer ..." (golint)
    • Line 38: warning: comment on exported function Consumer should be of the form "Consumer ..." (golint)
    • go-demo/sdk/alipay/alipay.go
    • Line 28: warning: comment on exported function WebPageAlipay should be of the form "WebPageAlipay ..." (golint)
    • Line 63: warning: comment on exported function WapAlipay should be of the form "WapAlipay ..." (golint)
    • Line 100: warning: comment on exported function GetAppPayURL should be of the form "GetAppPayURL ..." (golint)
    • Line 123: warning: comment on exported function GetQrPayURL should be of the form "GetQrPayURL ..." (golint)
    • go-demo/utils/mock/spider.go
    • Line 3: warning: exported type Spider should have comment or be unexported (golint)
    • Line 8: warning: exported function GetGoVersion should have comment or be unexported (golint)
    • go-demo/utils/seq/uuid.go
    • Line 8: warning: exported function UUID should have comment or be unexported (golint)
    • Line 12: warning: exported function UUIDShort should have comment or be unexported (golint)
    • go-demo/leetcode/lru/list/lru_list.go
    • Line 7: warning: comment on exported type Node should be of the form "Node ..." (with optional leading article) (golint)
    • Line 15: warning: comment on exported type LRUList should be of the form "LRUList ..." (with optional leading article) (golint)
    • Line 25: warning: exported function NewLRUCache should have comment or be unexported (golint)
    • Line 35: warning: exported method LRUList.Get should have comment or be unexported (golint)
    • Line 44: warning: exported method LRUList.Put should have comment or be unexported (golint)
    • Line 109: warning: exported method LRUList.Keys should have comment or be unexported (golint)
    • go-demo/sdk/mqtt/mqtt.go
    • Line 15: warning: exported const Host should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Client should have comment or be unexported (golint)
    • Line 28: warning: exported type Message should have comment or be unexported (golint)
    • Line 35: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 64: warning: exported method Client.GetClientID should have comment or be unexported (golint)
    • Line 68: warning: exported method Client.Connect should have comment or be unexported (golint)
    • Line 86: warning: comment on exported method Client.Publish should be of the form "Publish ..." (golint)
    • Line 106: warning: comment on exported method Client.Subscribe should be of the form "Subscribe ..." (golint)
    • Line 153: warning: exported method Client.Unsubscribe should have comment or be unexported (golint)
    • go-demo/utils/crypto/aes.go
    • Line 15: warning: exported const Pkcs5SaltLength should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported var ErrKeyLength should have comment or be unexported (golint)
    • Line 25: warning: exported function AesEncryptWithSalt should have comment or be unexported (golint)
    • Line 48: warning: exported function AesDecryptWithSalt should have comment or be unexported (golint)
    • Line 64: warning: comment on exported function AesCbcEncrypt should be of the form "AesCbcEncrypt ..." (golint)
    • Line 85: warning: exported function AesCbcDecrypt should have comment or be unexported (golint)
    • Line 101: warning: comment on exported function AesCfbEncrypt should be of the form "AesCfbEncrypt ..." (golint)
    • Line 117: warning: exported function AesCfbDecrypt should have comment or be unexported (golint)
    • Line 132: warning: exported function PKCS7Padding should have comment or be unexported (golint)
    • Line 138: warning: exported function PKCS7UnPadding should have comment or be unexported (golint)
    • go-demo/utils/crypto/base64.go
    • Line 13: warning: comment on exported function UnEncrypt should be of the form "UnEncrypt ..." (golint)
    • Line 19: warning: exported function Base64Encode should have comment or be unexported (golint)
    • Line 23: warning: exported function Base64Decode should have comment or be unexported (golint)
    • go-demo/blockchain/server/server.go
    • Line 10: warning: exported type BlockChainResponse should have comment or be unexported (golint)
    • Line 31: warning: exported function WriteBlockChain should have comment or be unexported (golint)
    • Line 39: warning: exported function GetBlockChain should have comment or be unexported (golint)
    • go-demo/design/decorator/decorator.go
    • Line 5: warning: exported type Person should have comment or be unexported (golint)
    • Line 34: warning: comment on exported type Jacket should be of the form "Jacket ..." (with optional leading article) (golint)
    • Line 48: warning: comment on exported type Hat should be of the form "Hat ..." (with optional leading article) (golint)
    • go-demo/sdk/redis/redis.go
    • Line 9: warning: exported var Redis should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function NewRedisClient should be of the form "NewRedisClient ..." (golint)
    • Line 65: warning: comment on exported method RedisClient.SSet should be of the form "SSet ..." (golint)
    • Line 70: warning: comment on exported method RedisClient.SGet should be of the form "SGet ..." (golint)
    • Line 75: warning: comment on exported method RedisClient.Close should be of the form "Close ..." (golint)
    • Line 80: warning: comment on exported function GetRedisClient should be of the form "GetRedisClient ..." (golint)
    • go-demo/utils/timex/timex.go
    • Line 13: warning: comment on exported function TimeConsuming should be of the form "TimeConsuming ..." (golint)
    • Line 22: warning: exported function Format should have comment or be unexported (golint)
    • Line 26: warning: exported function FormatTime should have comment or be unexported (golint)
    • Line 30: warning: exported function FormatYMD should have comment or be unexported (golint)
    • Line 34: warning: exported function FormatMD should have comment or be unexported (golint)
    • Line 38: warning: exported function ParseTime should have comment or be unexported (golint)
    • Line 42: warning: exported function ParseYMD should have comment or be unexported (golint)
    • Line 46: warning: comment on exported function FirstMonth should be of the form "FirstMonth ..." (golint)
    • Line 51: warning: comment on exported function FirstMonthUnix should be of the form "FirstMonthUnix ..." (golint)
    • Line 56: warning: comment on exported function LastMonth should be of the form "LastMonth ..." (golint)
    • Line 64: warning: comment on exported function LastMonthUnix should be of the form "LastMonthUnix ..." (golint)
    • go-demo/base/goroutine/goroutine.go
    • Line 11: warning: comment on exported function GetWithTimeout should be of the form "GetWithTimeout ..." (golint)
    • Line 27: warning: comment on exported function GetOne should be of the form "GetOne ..." (golint)
    • Line 41: warning: comment on exported function GetAll should be of the form "GetAll ..." (golint)
    • Line 57: warning: comment on exported function GetAllWithGroup should be of the form "GetAllWithGroup ..." (golint)
    • Line 76: warning: comment on exported function CancelTask should be of the form "CancelTask ..." (golint)
    • Line 107: warning: comment on exported function CancelAllTask should be of the form "CancelAllTask ..." (golint)
    • go-demo/utils/token/token.go
    • Line 13: warning: comment on exported const TokenClaimEXP should be of the form "TokenClaimEXP ..." (golint)
    • Line 15: warning: comment on exported const TokenClaimScope should be of the form "TokenClaimScope ..." (golint)
    • Line 17: warning: exported const TokenClaimAdmin should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: comment on exported const TokenClaimUID should be of the form "TokenClaimUID ..." (golint)
    • Line 23: warning: comment on exported function GenJwtToken should be of the form "GenJwtToken ..." (golint)
    • Line 31: warning: comment on exported function CheckJwtToken should be of the form "CheckJwtToken ..." (golint)
    • Line 42: warning: comment on exported function CheckJwtTokenExpected should be of the form "CheckJwtTokenExpected ..." (golint)
    • Line 51: warning: comment on exported function ParseJwtToken should be of the form "ParseJwtToken ..." (golint)
    • Line 64: warning: comment on exported function GetUIDFromToken should be of the form "GetUIDFromToken ..." (golint)
    • go-demo/utils/sentinel/fallback.go
    • Line 5: warning: comment on exported var BreakerFallbackMap should be of the form "BreakerFallbackMap ..." (golint)
    • Line 15: warning: comment on exported var BlockFallbackMap should be of the form "BlockFallbackMap ..." (golint)
    • go-demo/design/adaptor/adaptor.go
    • Line 5: warning: comment on exported type MusicPlayer should be of the form "MusicPlayer ..." (with optional leading article) (golint)
    • Line 10: warning: comment on exported type ExistPlayer should be of the form "ExistPlayer ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported type PlayerAdaptor should be of the form "PlayerAdaptor ..." (with optional leading article) (golint)
    • go-demo/base/http/server/http_server.go
    • Line 27: warning: comment on exported function FileServer should be of the form "FileServer ..." (golint)
    • Line 35: warning: comment on exported function HelloHandler should be of the form "HelloHandler ..." (golint)
    • Line 41: warning: comment on exported function Index should be of the form "Index ..." (golint)
    • Line 58: warning: comment on exported function Upload should be of the form "Upload ..." (golint)
    • Line 126: warning: comment on exported function Download should be of the form "Download ..." (golint)
    • go-demo/utils/seq/id.go
    • Line 25: warning: exported function NextNumID should have comment or be unexported (golint)
    • Line 30: warning: exported const IdPrefixKey should have comment or be unexported (golint)
    • Line 32: warning: exported function NextID should have comment or be unexported (golint)
    • go-demo/base/sync/atomic/atomic.go
    • Line 10: warning: comment on exported type AtomicValue should be of the form "AtomicValue ..." (with optional leading article) (golint)
    • Line 16: warning: exported function NewAtomicValue should have comment or be unexported (golint)
    • Line 20: warning: exported method AtomicValue.Store should have comment or be unexported (golint)
    • Line 38: warning: exported method AtomicValue.Load should have comment or be unexported (golint)
    • Line 42: warning: exported method AtomicValue.TypeOfValue should have comment or be unexported (golint)
    • go-demo/sdk/mysql/pool/mysql_pool.go
    • Line 13: warning: exported type Conn should have comment or be unexported (golint)
    • Line 29: warning: comment on exported type Permission should be of the form "Permission ..." (with optional leading article) (golint)
    • Line 37: warning: exported type NextConnIndex should have comment or be unexported (golint)
    • Line 41: warning: exported type Config should have comment or be unexported (golint)
    • Line 48: warning: comment on exported function Prepare should be of the form "Prepare ..." (golint)
    • Line 64: warning: comment on exported method Conn.New should be of the form "New ..." (golint)
    • Line 146: warning: comment on exported method Conn.Release should be of the form "Release ..." (golint)
    • go-demo/utils/crypto/rsa.go
    • Line 26: warning: exported var ErrPrivateKey should have comment or be unexported (golint)
    • Line 30: warning: exported function ParsePrivateKey should have comment or be unexported (golint)
    • Line 83: warning: exported function ParsePublicKey should have comment or be unexported (golint)
    • Line 124: warning: comment on exported function RSAEncrypt should be of the form "RSAEncrypt ..." (golint)
    • Line 134: warning: comment on exported function RSAEncryptWithKey should be of the form "RSAEncryptWithKey ..." (golint)
    • Line 150: warning: comment on exported function RASDecrypt should be of the form "RASDecrypt ..." (golint)
    • Line 162: warning: comment on exported function RSADecryptWithPKCS1 should be of the form "RSADecryptWithPKCS1 ..." (golint)
    • Line 172: warning: comment on exported function RSADecryptWithPKCS8 should be of the form "RSADecryptWithPKCS8 ..." (golint)
    • Line 182: warning: comment on exported function RsaDecryptWithKey should be of the form "RsaDecryptWithKey ..." (golint)
    • Line 197: warning: comment on exported function RsaSign should be of the form "RsaSign ..." (golint)
    • Line 209: warning: comment on exported function RsaSignWithKey should be of the form "RsaSignWithKey ..." (golint)
    • Line 217: warning: comment on exported function RSAVerify should be of the form "RSAVerify ..." (golint)
    • Line 226: warning: exported function RSAVerifyWithKey should have comment or be unexported (golint)
    • go-demo/design/template/template.go
    • Line 5: warning: exported type Cooker should have comment or be unexported (golint)
    • Line 13: warning: comment on exported type CookMenu should be of the form "CookMenu ..." (with optional leading article) (golint)
    • Line 46: warning: exported type XiHongShi should have comment or be unexported (golint)
    • Line 54: warning: exported type ChaoJiDan should have comment or be unexported (golint)
    • go-demo/utils/copy/copy.go
    • Line 9: warning: comment on exported function DeepCopy should be of the form "DeepCopy ..." (golint)
    • Line 18: warning: comment on exported function Copy should be of the form "Copy ..." (golint)
    • go-demo/sdk/weixin/weixin_pay.go
    • Line 17: warning: comment on exported const WeiXinPayUnifedURL should be of the form "WeiXinPayUnifedURL ..." (golint)
    • Line 19: warning: comment on exported const WeixinNotifyURL should be of the form "WeixinNotifyURL ..." (golint)
    • Line 21: warning: comment on exported const TradeTypeJSAPI should be of the form "TradeTypeJSAPI ..." (golint)
    • Line 23: warning: exported const TradeTypeNATIVE should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported const RewardBody should be of the form "RewardBody ..." (golint)
    • Line 26: warning: comment on exported const CreateIP should be of the form "CreateIP ..." (golint)
    • Line 28: warning: comment on exported const AppID should be of the form "AppID ..." (golint)
    • Line 30: warning: comment on exported const MchID should be of the form "MchID ..." (golint)
    • Line 32: warning: comment on exported const MchKey should be of the form "MchKey ..." (golint)
    • Line 36: warning: exported type PayRequest should have comment or be unexported (golint)
    • Line 44: warning: comment on exported function WeiXinPay should be of the form "WeiXinPay ..." (golint)
    • Line 77: warning: comment on exported function WeixinPayCode should be of the form "WeixinPayCode ..." (golint)
    • Line 128: warning: comment on exported type UnifyOrderRequest should be of the form "UnifyOrderRequest ..." (with optional leading article) (golint)
    • Line 143: warning: comment on exported type UnifyOrderResponse should be of the form "UnifyOrderResponse ..." (with optional leading article) (golint)
    • go-demo/design/chain/chain.go
    • Line 8: warning: exported type Handler should have comment or be unexported (golint)
    • Line 13: warning: comment on exported type AdHandler should be of the form "AdHandler ..." (with optional leading article) (golint)
    • Line 18: warning: exported method AdHandler.Handle should have comment or be unexported (golint)
    • Line 31: warning: comment on exported type YellowHandler should be of the form "YellowHandler ..." (with optional leading article) (golint)
    • Line 36: warning: exported method YellowHandler.Handle should have comment or be unexported (golint)
    • Line 49: warning: comment on exported type SensitiveHandler should be of the form "SensitiveHandler ..." (with optional leading article) (golint)
    • Line 54: warning: exported method SensitiveHandler.Handle should have comment or be unexported (golint)
    • go-demo/utils/i18n/i18n.go
    • Line 11: warning: exported function LoadYaml should have comment or be unexported (golint)
    • Line 29: warning: exported function LoadJson should have comment or be unexported (golint)
    • Line 47: warning: exported function LoadJsonFile should have comment or be unexported (golint)
    • go-demo/utils/pool/batch.go
    • Line 7: warning: comment on exported type BatchGoPool should be of the form "BatchGoPool ..." (with optional leading article) (golint)
    • Line 14: warning: exported type BatchResult should have comment or be unexported (golint)
    • Line 19: warning: exported function NewBatchPool should have comment or be unexported (golint)
    • Line 36: warning: exported method BatchGoPool.Queue should have comment or be unexported (golint)
    • Line 46: warning: exported method BatchGoPool.QueueWithArgs should have comment or be unexported (golint)
    • Line 56: warning: exported method BatchGoPool.Results should have comment or be unexported (golint)
    • Line 68: warning: exported method BatchGoPool.Cancel should have comment or be unexported (golint)
    • Line 72: warning: exported method BatchGoPool.WaitAll should have comment or be unexported (golint)
    • Line 76: warning: exported method BatchGoPool.Close should have comment or be unexported (golint)
    • go-demo/leetcode/lru/array/lru_array.go
    • Line 5: warning: exported type LRUArray should have comment or be unexported (golint)
    • Line 11: warning: exported function NewLRUArray should have comment or be unexported (golint)
    • Line 18: warning: exported method LRUArray.Put should have comment or be unexported (golint)
    • go-demo/utils/ratelimit/ip_rate.go
    • Line 8: warning: exported type IPRateLimit should have comment or be unexported (golint)
    • Line 15: warning: exported function NewIPRateLimiter should have comment or be unexported (golint)
    • Line 24: warning: exported method IPRateLimit.AddIp should have comment or be unexported (golint)
    • Line 32: warning: exported method IPRateLimit.GetLimiter should have comment or be unexported (golint)
    • go-demo/utils/word/word.go
    • Line 8: warning: comment on exported function ReplaceWord should be of the form "ReplaceWord ..." (golint)
    • Line 23: warning: comment on exported function ReplaceWithStyle should be of the form "ReplaceWithStyle ..." (golint)
    • go-demo/utils/gops/main.go
    • Line 15: warning: exported const B should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported function DiskCheck should be of the form "DiskCheck ..." (golint)
    • Line 40: warning: comment on exported function OSCheck should be of the form "OSCheck ..." (golint)
    • Line 45: warning: comment on exported function CPUCheck should be of the form "CPUCheck ..." (golint)
    • Line 65: warning: comment on exported function RAMCheck should be of the form "RAMCheck ..." (golint)
    • go-demo/utils/qrcode/qrcode.go
    • Line 7: warning: exported function GenQRCode should have comment or be unexported (golint)
    • Line 16: warning: exported function GenDefaultQRCode should have comment or be unexported (golint)
    • go-demo/design/options/options.go
    • Line 14: warning: exported type Connection should have comment or be unexported (golint)
    • Line 41: warning: exported function WithTimeout should have comment or be unexported (golint)
    • Line 47: warning: exported function WithCaching should have comment or be unexported (golint)
    • go-demo/utils/bar/spinner/spinner.go
    • Line 12: warning: exported type Spinner should have comment or be unexported (golint)
    • Line 17: warning: exported function NewSpinner should have comment or be unexported (golint)
    • Line 31: warning: exported method Spinner.Tick should have comment or be unexported (golint)
    • go-demo/design/strategy/strategy.go
    • Line 5: warning: comment on exported type IStrategy should be of the form "IStrategy ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported type Operator should be of the form "Operator ..." (with optional leading article) (golint)
    • go-demo/utils/ip/ip.go
    • Line 12: warning: comment on exported function GetInternetIP should be of the form "GetInternetIP ..." (golint)
    • Line 23: warning: comment on exported function GetLocalIP should be of the form "GetLocalIP ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.

    • go-demo/interview/interview_test.go
    • Line 108: warning: ineffectual assignment to i (ineffassign)
    • Line 180: warning: ineffectual assignment to r (ineffassign)
    • Line 216: warning: ineffectual assignment to s2 (ineffassign)
    • Line 234: warning: ineffectual assignment to b (ineffassign)
    • Line 377: warning: ineffectual assignment to f (ineffassign)
    • Line 403: warning: ineffectual assignment to s (ineffassign)
    • Line 436: warning: ineffectual assignment to i (ineffassign)
    • Line 572: warning: ineffectual assignment to k (ineffassign)

misspell99%

Misspell Finds commonly misspelled English words