Preparing report...

Report for github.com/upyun/go-sdk

A+    Excellent!    Found 12 issues across 22 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!


golint50%

Golint is a linter for Go source code.

    • go-sdk/upyun/form.go
    • Line 16: warning: exported type FormUploadConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type FormUploadResp should have comment or be unexported (golint)
    • Line 38: warning: exported method FormUploadConfig.Format should have comment or be unexported (golint)
    • Line 56: warning: exported method UpYun.FormUpload should have comment or be unexported (golint)
    • go-sdk/upyun/upyun.go
    • Line 16: warning: exported type UpYunConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type UpYun should have comment or be unexported (golint)
    • Line 31: warning: exported function NewUpYun should have comment or be unexported (golint)
    • Line 55: warning: exported method UpYun.SetHTTPClient should have comment or be unexported (golint)
    • Line 59: warning: exported method UpYun.UseDeprecatedApi should have comment or be unexported (golint)
    • go-sdk/upyun/utils.go
    • Line 203: warning: exported type JsonFileInfo should have comment or be unexported (golint)
    • Line 209: warning: exported type JsonFiles should have comment or be unexported (golint)
    • go-sdk/examples/user_profile.go
    • Line 24: warning: comment on exported const NOTIFY_URL should be of the form "NOTIFY_URL ..." (golint)
    • Line 27: warning: comment on exported const LOCAL_IMAGE should be of the form "LOCAL_IMAGE ..." (golint)
    • Line 30: warning: comment on exported const LOCAL_VIDEO should be of the form "LOCAL_VIDEO ..." (golint)
    • Line 33: warning: comment on exported const LOCAL_DOC should be of the form "LOCAL_DOC ..." (golint)
    • Line 36: warning: comment on exported const LOCAL_MP3 should be of the form "LOCAL_MP3 ..." (golint)
    • Line 39: warning: comment on exported const SAVE_KEY_IMAGE should be of the form "SAVE_KEY_IMAGE ..." (golint)
    • Line 42: warning: comment on exported const SAVE_KEY_VIDEO should be of the form "SAVE_KEY_VIDEO ..." (golint)
    • Line 45: warning: comment on exported const SAVE_KEY_DOC should be of the form "SAVE_KEY_DOC ..." (golint)
    • Line 48: warning: comment on exported const SAVE_KEY_MP3 should be of the form "SAVE_KEY_MP3 ..." (golint)
    • Line 51: warning: comment on exported const SAVE_KEY_M3U8 should be of the form "SAVE_KEY_M3U8 ..." (golint)
    • Line 54: warning: comment on exported const SAVE_AS_IMAGE should be of the form "SAVE_AS_IMAGE ..." (golint)
    • Line 57: warning: comment on exported const SAVE_AS_VIDEO should be of the form "SAVE_AS_VIDEO ..." (golint)
    • Line 60: warning: comment on exported const SAVE_AS_DOC should be of the form "SAVE_AS_DOC ..." (golint)
    • Line 63: warning: comment on exported const SAVE_AS_ZIP should be of the form "SAVE_AS_ZIP ..." (golint)
    • Line 66: warning: comment on exported const SAVE_AS_DIR should be of the form "SAVE_AS_DIR ..." (golint)
    • Line 69: warning: comment on exported const SAVE_AS_M3U8 should be of the form "SAVE_AS_M3U8 ..." (golint)
    • Line 72: warning: comment on exported const URL should be of the form "URL ..." (golint)
    • Line 75: warning: comment on exported const RTMP_SOURCE should be of the form "RTMP_SOURCE ..." (golint)
    • go-sdk/upyun/errors.go
    • Line 11: warning: exported type Error should have comment or be unexported (golint)
    • Line 56: warning: exported function IsNotExist should have comment or be unexported (golint)
    • Line 60: warning: exported function IsNotModified should have comment or be unexported (golint)
    • Line 64: warning: exported function IsTooManyRequests should have comment or be unexported (golint)
    • go-sdk/upyun/process.go
    • Line 14: warning: exported type CommitTasksConfig should have comment or be unexported (golint)
    • Line 22: warning: exported type LiveauditCreateTask should have comment or be unexported (golint)
    • Line 30: warning: exported type LiveauditCancelTask should have comment or be unexported (golint)
    • Line 34: warning: exported type SyncCommonTask should have comment or be unexported (golint)
    • Line 39: warning: exported method UpYun.CommitTasks should have comment or be unexported (golint)
    • Line 61: warning: exported method UpYun.GetProgress should have comment or be unexported (golint)
    • Line 77: warning: exported method UpYun.GetResult should have comment or be unexported (golint)
    • Line 143: warning: exported method UpYun.CommitSyncTasks should have comment or be unexported (golint)
    • go-sdk/upyun/rest.go
    • Line 20: warning: exported const DefaultPartSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: comment on exported type GetObjectsConfig should be of the form "GetObjectsConfig ..." (with optional leading article) (golint)
    • Line 77: warning: exported type MoveObjectConfig should have comment or be unexported (golint)
    • Line 83: warning: exported type CopyObjectConfig should have comment or be unexported (golint)
    • Line 89: warning: comment on exported type UploadPartConfig should be of the form "UploadPartConfig ..." (with optional leading article) (golint)
    • Line 95: warning: exported type CompleteMultipartUploadConfig should have comment or be unexported (golint)
    • Line 98: warning: exported type InitMultipartUploadConfig should have comment or be unexported (golint)
    • Line 105: warning: exported type InitMultipartUploadResult should have comment or be unexported (golint)
    • Line 111: warning: exported type DeleteObjectConfig should have comment or be unexported (golint)
    • Line 117: warning: exported type ModifyMetadataConfig should have comment or be unexported (golint)
    • Line 123: warning: exported type ListMultipartConfig should have comment or be unexported (golint)
    • Line 127: warning: exported type ListMultipartPartsConfig should have comment or be unexported (golint)
    • Line 130: warning: exported type MultipartUploadFile should have comment or be unexported (golint)
    • Line 136: warning: exported type ListMultipartUploadResult should have comment or be unexported (golint)
    • Line 139: warning: exported type MultipartUploadedPart should have comment or be unexported (golint)
    • Line 144: warning: exported type ListUploadedPartsResult should have comment or be unexported (golint)
    • Line 148: warning: exported method UpYun.Usage should have comment or be unexported (golint)
    • Line 166: warning: exported method UpYun.Mkdir should have comment or be unexported (golint)
    • Line 182: warning: comment on exported method UpYun.Get should be of the form "Get ..." (golint)
    • Line 329: warning: exported method UpYun.Put should have comment or be unexported (golint)
    • Line 345: warning: exported method UpYun.Move should have comment or be unexported (golint)
    • Line 363: warning: exported method UpYun.Copy should have comment or be unexported (golint)
    • Line 381: warning: exported method UpYun.InitMultipartUpload should have comment or be unexported (golint)
    • Line 411: warning: exported method UpYun.UploadPart should have comment or be unexported (golint)
    • Line 431: warning: exported method UpYun.CompleteMultipartUpload should have comment or be unexported (golint)
    • Line 450: warning: exported method UpYun.ListMultipartUploads should have comment or be unexported (golint)
    • Line 484: warning: exported method UpYun.ListMultipartParts should have comment or be unexported (golint)
    • Line 514: warning: exported method UpYun.Delete should have comment or be unexported (golint)
    • Line 534: warning: exported method UpYun.GetInfo should have comment or be unexported (golint)
    • Line 548: warning: exported method UpYun.List should have comment or be unexported (golint)
    • Line 652: warning: exported method UpYun.ModifyMetadata should have comment or be unexported (golint)
    • go-sdk/upyun/auth.go
    • Line 9: warning: exported type RESTAuthConfig should have comment or be unexported (golint)
    • Line 16: warning: exported type PurgeAuthConfig should have comment or be unexported (golint)
    • Line 21: warning: exported type UnifiedAuthConfig should have comment or be unexported (golint)
    • Line 29: warning: exported method UpYun.MakeRESTAuth should have comment or be unexported (golint)
    • Line 40: warning: exported method UpYun.MakePurgeAuth should have comment or be unexported (golint)
    • Line 50: warning: exported method UpYun.MakeFormAuth should have comment or be unexported (golint)
    • Line 54: warning: exported method UpYun.MakeProcessAuth should have comment or be unexported (golint)
    • Line 68: warning: exported method UpYun.MakeUnifiedAuth should have comment or be unexported (golint)

gocyclo90%

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.

    • go-sdk/upyun/rest.go
    • Line 548: warning: cyclomatic complexity 26 of function (*UpYun).List() is high (> 15) (gocyclo)
    • Line 669: warning: cyclomatic complexity 17 of function (*UpYun).doRESTRequest() is high (> 15) (gocyclo)
    • Line 255: warning: cyclomatic complexity 16 of function (*UpYun).resumePut() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!