Preparing report...

Report for github.com/iyear/pure-live-core

(v0.0.0-20220101083647-d03038e2f907)

A+    Excellent!    Found 48 issues across 76 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


gocyclo98%

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.


golint36%

Golint is a linter for Go source code.

    • app/server/internal/api/v1/live.go
    • Line 13: warning: exported function GetPlayURL should have comment or be unexported (golint)
    • Line 30: warning: exported function GetRoomInfo should have comment or be unexported (golint)
    • Line 47: warning: exported function SendDanmaku should have comment or be unexported (golint)
    • pkg/db/db.go
    • Line 10: warning: exported function Init should have comment or be unexported (golint)
    • service/svc_os/mem.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported function GetSysMem should have comment or be unexported (golint)
    • Line 22: warning: exported function GetSelfMem should have comment or be unexported (golint)
    • pkg/conf/const.go
    • Line 4: warning: exported const PlatAbstract should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported const EventDanmaku should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported const DanmakuTypeRight should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported const QnBest should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported const StreamFlv should have comment (or a comment on this block) or be unexported (golint)
    • service/svc_live/live.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported function GetRoomInfo should have comment or be unexported (golint)
    • Line 25: warning: exported function GetPlayURL should have comment or be unexported (golint)
    • service/svc_os/os.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: exported function GetOSInfo should have comment or be unexported (golint)
    • pkg/client/internal/douyu/base.go
    • Line 21: warning: exported type Douyu should have comment or be unexported (golint)
    • Line 25: warning: exported function NewDouyu should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method Douyu.Plat should be of the form "Plat ..." (golint)
    • Line 34: warning: comment on exported method Douyu.GetPlayURL should be of the form "GetPlayURL ..." (golint)
    • Line 152: warning: comment on exported method Douyu.GetRoomInfo should be of the form "GetRoomInfo ..." (golint)
    • Line 172: warning: comment on exported method Douyu.Host should be of the form "Host ..." (golint)
    • Line 177: warning: exported method Douyu.Enter should have comment or be unexported (golint)
    • Line 184: warning: exported method Douyu.Handle should have comment or be unexported (golint)
    • Line 206: warning: exported method Douyu.HeartBeat should have comment or be unexported (golint)
    • Line 212: warning: exported method Douyu.SendDanmaku should have comment or be unexported (golint)
    • Line 220: warning: exported method Douyu.Stop should have comment or be unexported (golint)
    • service/svc_fav/list.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported function AddFavList should have comment or be unexported (golint)
    • Line 20: warning: exported function GetAllFavLists should have comment or be unexported (golint)
    • Line 28: warning: exported function DelFavList should have comment or be unexported (golint)
    • Line 42: warning: exported function EditFavList should have comment or be unexported (golint)
    • Line 53: warning: exported function GetFavList should have comment or be unexported (golint)
    • pkg/forwarder/out.go
    • Line 10: warning: exported function Pull should have comment or be unexported (golint)
    • Line 14: warning: exported function OutLoop should have comment or be unexported (golint)
    • pkg/client/internal/huya/base.go
    • Line 23: warning: exported type Huya should have comment or be unexported (golint)
    • Line 26: warning: exported type H should have comment or be unexported (golint)
    • Line 28: warning: comment on exported function NewHuya should be of the form "NewHuya ..." (golint)
    • Line 33: warning: comment on exported method Huya.Plat should be of the form "Plat ..." (golint)
    • Line 38: warning: comment on exported method Huya.GetPlayURL should be of the form "GetPlayURL ..." (golint)
    • Line 73: warning: comment on exported method Huya.GetRoomInfo should be of the form "GetRoomInfo ..." (golint)
    • Line 88: warning: comment on exported method Huya.Host should be of the form "Host ..." (golint)
    • Line 93: warning: comment on exported method Huya.Enter should be of the form "Enter ..." (golint)
    • Line 106: warning: comment on exported method Huya.HeartBeat should be of the form "HeartBeat ..." (golint)
    • Line 112: warning: comment on exported method Huya.Handle should be of the form "Handle ..." (golint)
    • Line 160: warning: comment on exported method Huya.SendDanmaku should be of the form "SendDanmaku ..." (golint)
    • Line 169: warning: comment on exported method Huya.Stop should be of the form "Stop ..." (golint)
    • service/svc_fav/fav.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: exported function GetFav should have comment or be unexported (golint)
    • Line 15: warning: exported function AddFav should have comment or be unexported (golint)
    • Line 28: warning: exported function DelFav should have comment or be unexported (golint)
    • Line 38: warning: exported function EditFav should have comment or be unexported (golint)
    • pkg/client/internal/huya/internal/tars/danmaku/danmaku.go
    • Line 24: warning: exported method SenderInfo.ResetDefault should have comment or be unexported (golint)
    • Line 148: warning: exported method ContentFormat.ResetDefault should have comment or be unexported (golint)
    • Line 264: warning: exported method BulletFormat.ResetDefault should have comment or be unexported (golint)
    • Line 398: warning: exported method DecorationInfo.ResetDefault should have comment or be unexported (golint)
    • Line 568: warning: exported method UidNickName.ResetDefault should have comment or be unexported (golint)
    • Line 681: warning: exported method MessageNotice.ResetDefault should have comment or be unexported (golint)
    • pkg/client/internal/bilibili/bilibili.go
    • Line 9: warning: exported type BiliBili should have comment or be unexported (golint)
    • Line 13: warning: exported type BiliComm should have comment or be unexported (golint)
    • Line 18: warning: exported method BiliBili.SendDanmaku should have comment or be unexported (golint)
    • Line 32: warning: exported method BiliComm.SendDanmaku should have comment or be unexported (golint)
    • service/svc_os/cpu.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported function GetSysCPU should have comment or be unexported (golint)
    • Line 17: warning: exported function GetSelfCPU should have comment or be unexported (golint)
    • cmd/root.go
    • Line 31: warning: exported function Execute should have comment or be unexported (golint)
    • model/base.go
    • Line 3: warning: exported type TimeHook should have comment or be unexported (golint)
    • pkg/client/internal/egame/base.go
    • Line 14: warning: exported type EGame should have comment or be unexported (golint)
    • Line 18: warning: comment on exported function NewEGame should be of the form "NewEGame ..." (golint)
    • Line 23: warning: comment on exported method EGame.Plat should be of the form "Plat ..." (golint)
    • Line 46: warning: comment on exported method EGame.GetPlayURL should be of the form "GetPlayURL ..." (golint)
    • Line 63: warning: comment on exported method EGame.GetRoomInfo should be of the form "GetRoomInfo ..." (golint)
    • Line 80: warning: comment on exported method EGame.Host should be of the form "Host ..." (golint)
    • Line 85: warning: comment on exported method EGame.Enter should be of the form "Enter ..." (golint)
    • Line 91: warning: comment on exported method EGame.Handle should be of the form "Handle ..." (golint)
    • Line 98: warning: comment on exported method EGame.HeartBeat should be of the form "HeartBeat ..." (golint)
    • Line 103: warning: comment on exported method EGame.SendDanmaku should be of the form "SendDanmaku ..." (golint)
    • Line 112: warning: comment on exported method EGame.Stop should be of the form "Stop ..." (golint)
    • app/server/internal/api/v1/fav.go
    • Line 12: warning: exported function AddFavList should have comment or be unexported (golint)
    • Line 29: warning: exported function GetAllFavLists should have comment or be unexported (golint)
    • Line 38: warning: exported function DelFavList should have comment or be unexported (golint)
    • Line 53: warning: exported function EditFavList should have comment or be unexported (golint)
    • Line 72: warning: exported function GetFavList should have comment or be unexported (golint)
    • Line 92: warning: exported function GetFav should have comment or be unexported (golint)
    • Line 109: warning: exported function AddFav should have comment or be unexported (golint)
    • Line 129: warning: exported function DelFav should have comment or be unexported (golint)
    • Line 146: warning: exported function EditFav should have comment or be unexported (golint)
    • app/server/internal/api/v1/os.go
    • Line 11: warning: exported function GetOSInfo should have comment or be unexported (golint)
    • Line 20: warning: exported function GetSysMem should have comment or be unexported (golint)
    • Line 29: warning: exported function GetSelfMem should have comment or be unexported (golint)
    • Line 38: warning: exported function GetSysCPU should have comment or be unexported (golint)
    • Line 47: warning: exported function GetSelfCPU should have comment or be unexported (golint)
    • Line 56: warning: exported function GetOSAll should have comment or be unexported (golint)
    • model/msg.go
    • Line 5: warning: exported type Msg should have comment or be unexported (golint)
    • Line 9: warning: exported type MsgDanmaku should have comment or be unexported (golint)
    • Line 15: warning: exported method MsgDanmaku.Event should have comment or be unexported (golint)
    • Line 19: warning: exported type MsgHot should have comment or be unexported (golint)
    • Line 23: warning: exported method MsgHot.Event should have comment or be unexported (golint)
    • pkg/ecode/code.go
    • Line 4: warning: exported const Success should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!