Preparing report...

Report for github.com/Mikubill/transfer

A+    Excellent!    Found 66 issues across 117 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!


gocyclo86%

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.

    • transfer/crypto/command.go
    • Line 106: warning: cyclomatic complexity 16 of function Decrypt() is high (> 15) (gocyclo)
    • Line 35: warning: cyclomatic complexity 16 of function Encrypt() is high (> 15) (gocyclo)

golint56%

Golint is a linter for Go source code.

    • transfer/apis/public/notion/client.go
    • Line 27: warning: exported const CommandSet should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported function NewWebClient should have comment or be unexported (golint)
    • Line 182: warning: exported function ByteCountIEC should have comment or be unexported (golint)
    • Line 336: warning: exported method GetUploadFileUrlResponse.Parse should have comment or be unexported (golint)
    • transfer/apis/image/suning.go
    • Line 16: warning: exported var SNBackend should have comment or be unexported (golint)
    • Line 19: warning: exported type SN should have comment or be unexported (golint)
    • Line 23: warning: exported type SNResp should have comment or be unexported (golint)
    • Line 37: warning: exported method SN.Upload should have comment or be unexported (golint)
    • transfer/crypto/ece/engine.go
    • Line 20: warning: exported const KeySize should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported const DefaultRecordSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported var ErrInvalidKeySize should have comment or be unexported (golint)
    • Line 260: warning: exported function SingleKey should have comment or be unexported (golint)
    • transfer/apis/image/toutiao.go
    • Line 10: warning: exported var TTBackend should have comment or be unexported (golint)
    • Line 13: warning: exported type TT should have comment or be unexported (golint)
    • Line 17: warning: exported type TTResp should have comment or be unexported (golint)
    • Line 32: warning: exported method TT.Upload should have comment or be unexported (golint)
    • transfer/cmd/controller.go
    • Line 74: warning: exported function ParseLink should have comment or be unexported (golint)
    • Line 98: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • transfer/apis/base.go
    • Line 11: warning: exported type BaseBackend should have comment or be unexported (golint)
    • Line 18: warning: exported type DownloaderConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type DownConfig should have comment or be unexported (golint)
    • Line 34: warning: exported type Uploader should have comment or be unexported (golint)
    • Line 45: warning: exported type Downloader should have comment or be unexported (golint)
    • Line 49: warning: exported type Backend should have comment or be unexported (golint)
    • Line 54: warning: exported method Backend.StartProgress should have comment or be unexported (golint)
    • Line 61: warning: exported method Backend.EndProgress should have comment or be unexported (golint)
    • Line 65: warning: exported method Backend.InitUpload should have comment or be unexported (golint)
    • Line 69: warning: exported method Backend.FinishUpload should have comment or be unexported (golint)
    • Line 73: warning: exported method Backend.PreUpload should have comment or be unexported (golint)
    • Line 77: warning: exported method Backend.DoUpload should have comment or be unexported (golint)
    • Line 81: warning: exported method Backend.PostUpload should have comment or be unexported (golint)
    • Line 85: warning: exported method Backend.DoDownload should have comment or be unexported (golint)
    • Line 93: warning: exported function AddHeaders should have comment or be unexported (golint)
    • transfer/apis/public/notion/struct.go
    • Line 14: warning: exported type PageDataRequest should have comment or be unexported (golint)
    • Line 22: warning: exported type PageDataResponse should have comment or be unexported (golint)
    • Line 68: warning: exported type Transaction should have comment or be unexported (golint)
    • Line 74: warning: exported type Pointer should have comment or be unexported (golint)
    • Line 79: warning: exported type Operation should have comment or be unexported (golint)
    • transfer/apis/image/ccupload.go
    • Line 10: warning: exported var CCBackend should have comment or be unexported (golint)
    • Line 13: warning: exported type CC should have comment or be unexported (golint)
    • Line 17: warning: exported type CCResp should have comment or be unexported (golint)
    • Line 23: warning: exported type CCImageItem should have comment or be unexported (golint)
    • Line 38: warning: exported method CC.Upload should have comment or be unexported (golint)
    • transfer/apis/image/upload.go
    • Line 13: warning: exported var Backend should have comment or be unexported (golint)
    • Line 17: warning: exported function InitCmd should have comment or be unexported (golint)
    • Line 24: warning: exported function Upload should have comment or be unexported (golint)
    • Line 55: warning: exported function ParseBackend should have comment or be unexported (golint)
    • transfer/apis/image/xiaomi.go
    • Line 10: warning: exported var XMBackend should have comment or be unexported (golint)
    • Line 13: warning: exported type XM should have comment or be unexported (golint)
    • Line 17: warning: exported type XMResp should have comment or be unexported (golint)
    • Line 32: warning: exported method XM.Upload should have comment or be unexported (golint)
    • transfer/crypto/stream.go
    • Line 13: warning: exported function CalcEncryptSize should have comment or be unexported (golint)
    • Line 18: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 24: warning: exported function StreamEncrypt should have comment or be unexported (golint)
    • Line 53: warning: exported function StreamDecrypt should have comment or be unexported (golint)
    • transfer/apis/image/baidu.go
    • Line 16: warning: exported var BDBackend should have comment or be unexported (golint)
    • Line 19: warning: exported type BD should have comment or be unexported (golint)
    • Line 23: warning: exported type BDResp should have comment or be unexported (golint)
    • Line 28: warning: exported type BDItem should have comment or be unexported (golint)
    • Line 42: warning: exported method BD.Upload should have comment or be unexported (golint)
    • transfer/apis/image/netease.go
    • Line 9: warning: exported var NTBackend should have comment or be unexported (golint)
    • Line 12: warning: exported type NT should have comment or be unexported (golint)
    • Line 16: warning: exported type NTResp should have comment or be unexported (golint)
    • Line 32: warning: exported method NT.Upload should have comment or be unexported (golint)
    • transfer/cmd/root.go
    • Line 42: warning: exported var VersionMode should have comment or be unexported (golint)
    • Line 65: warning: exported function Execute should have comment or be unexported (golint)
    • transfer/apis/image/telegraph.go
    • Line 9: warning: exported var TGBackend should have comment or be unexported (golint)
    • Line 12: warning: exported type TG should have comment or be unexported (golint)
    • Line 26: warning: exported method TG.Upload should have comment or be unexported (golint)
    • transfer/apis/image/smms.go
    • Line 11: warning: exported var SMBackend should have comment or be unexported (golint)
    • Line 14: warning: exported type SM should have comment or be unexported (golint)
    • Line 18: warning: exported type SMResp should have comment or be unexported (golint)
    • Line 24: warning: exported type SMItem should have comment or be unexported (golint)
    • Line 40: warning: exported method SM.Upload should have comment or be unexported (golint)
    • transfer/apis/command.go
    • Line 8: warning: exported var Crypto should have comment or be unexported (golint)
    • Line 15: warning: exported function InitCmd should have comment or be unexported (golint)
    • transfer/apis/image/prntscr.go
    • Line 13: warning: exported var PRBackend should have comment or be unexported (golint)
    • Line 17: warning: exported type PR should have comment or be unexported (golint)
    • Line 21: warning: exported type PRResp should have comment or be unexported (golint)
    • Line 36: warning: exported method PR.Upload should have comment or be unexported (golint)
    • transfer/utils/tools.go
    • Line 39: warning: comment on exported function IsFile should be of the form "IsFile ..." (golint)
    • Line 44: warning: exported function URLSafeEncodeByte should have comment or be unexported (golint)
    • Line 52: warning: exported function URLSafeEncode should have comment or be unexported (golint)
    • transfer/apis/image/alibaba.go
    • Line 17: warning: exported var AliBackend should have comment or be unexported (golint)
    • Line 20: warning: exported type Ali should have comment or be unexported (golint)
    • Line 24: warning: exported type AliResp should have comment or be unexported (golint)
    • Line 40: warning: exported method Ali.UploadStream should have comment or be unexported (golint)
    • Line 56: warning: exported method Ali.DownloadStream should have comment or be unexported (golint)
    • Line 81: warning: exported method Ali.Upload should have comment or be unexported (golint)
    • transfer/apis/image/base.go
    • Line 20: warning: exported type PicBed should have comment or be unexported (golint)
    • Line 34: warning: exported type UploadDataFlow should have comment or be unexported (golint)
    • Line 41: warning: exported type DownloadDataFlow should have comment or be unexported (golint)
    • Line 109: warning: exported function NewWriter should have comment or be unexported (golint)
    • transfer/apis/image/juejin.go
    • Line 11: warning: exported var JJBackend should have comment or be unexported (golint)
    • Line 14: warning: exported type JJ should have comment or be unexported (golint)
    • Line 18: warning: exported type JJResp should have comment or be unexported (golint)
    • Line 23: warning: exported type JJCol should have comment or be unexported (golint)
    • Line 27: warning: exported type JJItem should have comment or be unexported (golint)
    • Line 42: warning: exported method JJ.Upload should have comment or be unexported (golint)
    • transfer/apis/image/sogou.go
    • Line 4: warning: exported var SGBackend should have comment or be unexported (golint)
    • Line 7: warning: exported type SG should have comment or be unexported (golint)
    • Line 19: warning: exported method SG.Upload should have comment or be unexported (golint)
    • transfer/crypto/command.go
    • Line 17: warning: exported var ForceMode should have comment or be unexported (golint)
    • Line 24: warning: exported function InitCmd should have comment or be unexported (golint)
    • Line 35: warning: exported function Encrypt should have comment or be unexported (golint)
    • Line 106: warning: exported function Decrypt should have comment or be unexported (golint)
    • transfer/apis/image/vimcn.go
    • Line 8: warning: exported var VMBackend should have comment or be unexported (golint)
    • Line 11: warning: exported type VM should have comment or be unexported (golint)
    • Line 25: warning: exported method VM.Upload should have comment 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!