Preparing report...

Report for github.com/rizalgowandy/coinbase-commerce-go

A    Great!    Found 39 issues across 44 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!


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!


golint11%

Golint is a linter for Go source code.

    • coinbase-commerce-go/pkg/enum/event.go
    • Line 3: warning: exported type EventType should have comment or be unexported (golint)
    • Line 9: warning: comment on exported const EventTypeChargeConfirmed should be of the form "EventTypeChargeConfirmed ..." (golint)
    • coinbase-commerce-go/pkg/enum/pricing_type.go
    • Line 3: warning: exported type PricingType should have comment or be unexported (golint)
    • Line 6: warning: exported const PricingTypeNoPrice should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: comment on exported const PricingTypeFixedPrice should be of the form "PricingTypeFixedPrice ..." (golint)
    • coinbase-commerce-go/pkg/api/events.go
    • Line 10: warning: exported function NewEvents should have comment or be unexported (golint)
    • Line 16: warning: exported type Events should have comment or be unexported (golint)
    • Line 20: warning: exported method Events.List should have comment or be unexported (golint)
    • Line 45: warning: exported method Events.Show should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/entity/checkouts.go
    • Line 11: warning: exported type ListCheckoutsReq should have comment or be unexported (golint)
    • Line 15: warning: exported type ListCheckoutsResp should have comment or be unexported (golint)
    • Line 22: warning: exported type ShowCheckoutReq should have comment or be unexported (golint)
    • Line 26: warning: exported method ShowCheckoutReq.Validate should have comment or be unexported (golint)
    • Line 39: warning: exported type ShowCheckoutResp should have comment or be unexported (golint)
    • Line 45: warning: exported type CreateCheckoutReq should have comment or be unexported (golint)
    • Line 53: warning: exported type CreateCheckoutPrice should have comment or be unexported (golint)
    • Line 58: warning: exported type CreateCheckoutResp should have comment or be unexported (golint)
    • Line 64: warning: exported type UpdateCheckoutReq should have comment or be unexported (golint)
    • Line 73: warning: exported method UpdateCheckoutReq.Validate should have comment or be unexported (golint)
    • Line 85: warning: exported type UpdateCheckoutPrice should have comment or be unexported (golint)
    • Line 90: warning: exported type UpdateCheckoutResp should have comment or be unexported (golint)
    • Line 96: warning: exported type DeleteCheckoutReq should have comment or be unexported (golint)
    • Line 100: warning: exported method DeleteCheckoutReq.Validate should have comment or be unexported (golint)
    • Line 112: warning: exported type DeleteCheckoutResp should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/stub/checkouts.go
    • Line 9: warning: exported function NewCheckouts should have comment or be unexported (golint)
    • Line 13: warning: exported type Checkouts should have comment or be unexported (golint)
    • Line 15: warning: exported method Checkouts.Show should have comment or be unexported (golint)
    • Line 28: warning: exported method Checkouts.Create should have comment or be unexported (golint)
    • Line 45: warning: exported method Checkouts.List should have comment or be unexported (golint)
    • Line 71: warning: exported method Checkouts.Update should have comment or be unexported (golint)
    • Line 89: warning: exported method Checkouts.Delete should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/api/charges.go
    • Line 10: warning: exported function NewCharges should have comment or be unexported (golint)
    • Line 16: warning: exported type Charges should have comment or be unexported (golint)
    • Line 20: warning: exported method Charges.Create should have comment or be unexported (golint)
    • Line 46: warning: exported method Charges.Show should have comment or be unexported (golint)
    • Line 71: warning: exported method Charges.List should have comment or be unexported (golint)
    • Line 96: warning: exported method Charges.Cancel should have comment or be unexported (golint)
    • Line 122: warning: exported method Charges.Resolve should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/stub/invoices.go
    • Line 10: warning: exported function NewInvoices should have comment or be unexported (golint)
    • Line 14: warning: exported type Invoices should have comment or be unexported (golint)
    • Line 16: warning: exported method Invoices.Create should have comment or be unexported (golint)
    • Line 33: warning: exported method Invoices.Show should have comment or be unexported (golint)
    • Line 51: warning: exported method Invoices.List should have comment or be unexported (golint)
    • Line 77: warning: exported method Invoices.Void should have comment or be unexported (golint)
    • Line 96: warning: exported method Invoices.Resolve should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/enum/charge.go
    • Line 3: warning: exported type ChargeStatus should have comment or be unexported (golint)
    • Line 6: warning: exported const ChargeStatusNew should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type ChargeUnresolvedContext should have comment or be unexported (golint)
    • Line 20: warning: exported const ChargeUnresolvedContextNone should have comment (or a comment on this block) or be unexported (golint)
    • coinbase-commerce-go/pkg/entity/error.go
    • Line 9: warning: exported type ErrResp should have comment or be unexported (golint)
    • Line 14: warning: exported method ErrResp.Valid should have comment or be unexported (golint)
    • Line 18: warning: exported type ErrDetailResp should have comment or be unexported (golint)
    • Line 23: warning: exported method ErrDetailResp.Code should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/entity/invoices.go
    • Line 9: warning: exported type ListInvoicesReq should have comment or be unexported (golint)
    • Line 13: warning: exported type ListInvoicesResp should have comment or be unexported (golint)
    • Line 27: warning: exported method ShowInvoiceReq.Validate should have comment or be unexported (golint)
    • Line 43: warning: exported type ShowInvoiceResp should have comment or be unexported (golint)
    • Line 49: warning: exported type CreateInvoiceReq should have comment or be unexported (golint)
    • Line 57: warning: exported type CreateInvoicePrice should have comment or be unexported (golint)
    • Line 62: warning: exported type CreateInvoiceResp should have comment or be unexported (golint)
    • Line 68: warning: exported type VoidInvoiceReq should have comment or be unexported (golint)
    • Line 73: warning: exported method VoidInvoiceReq.Validate should have comment or be unexported (golint)
    • Line 89: warning: exported type VoidInvoiceResp should have comment or be unexported (golint)
    • Line 95: warning: exported type ResolveInvoiceReq should have comment or be unexported (golint)
    • Line 100: warning: exported method ResolveInvoiceReq.Validate should have comment or be unexported (golint)
    • Line 116: warning: exported type ResolveInvoiceResp should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/stub/context.go
    • Line 12: warning: exported const CtxKeyStub should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported function Enable should have comment or be unexported (golint)
    • Line 24: warning: exported function Ok should have comment or be unexported (golint)
    • Line 35: warning: exported function SetErrDetailResp should have comment or be unexported (golint)
    • Line 43: warning: exported function GetErrDetailResp should have comment or be unexported (golint)
    • Line 54: warning: exported function SetWebhookReq should have comment or be unexported (golint)
    • Line 62: warning: exported function GetWebhookReq should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/stub/webhooks.go
    • Line 16: warning: exported function NewWebhooks should have comment or be unexported (golint)
    • Line 44: warning: exported type Webhooks should have comment or be unexported (golint)
    • Line 51: warning: exported method Webhooks.Register should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/stub/events.go
    • Line 9: warning: exported function NewEvents should have comment or be unexported (golint)
    • Line 13: warning: exported type Events should have comment or be unexported (golint)
    • Line 15: warning: exported method Events.Show should have comment or be unexported (golint)
    • Line 28: warning: exported method Events.List should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/stub/charges.go
    • Line 12: warning: exported function NewCharges should have comment or be unexported (golint)
    • Line 18: warning: exported type Charges should have comment or be unexported (golint)
    • Line 22: warning: exported method Charges.Create should have comment or be unexported (golint)
    • Line 47: warning: exported method Charges.Show should have comment or be unexported (golint)
    • Line 65: warning: exported method Charges.List should have comment or be unexported (golint)
    • Line 91: warning: exported method Charges.Cancel should have comment or be unexported (golint)
    • Line 118: warning: exported method Charges.Resolve should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/api/checkouts.go
    • Line 10: warning: exported function NewCheckouts should have comment or be unexported (golint)
    • Line 16: warning: exported type Checkouts should have comment or be unexported (golint)
    • Line 20: warning: exported method Checkouts.List should have comment or be unexported (golint)
    • Line 45: warning: exported method Checkouts.Show should have comment or be unexported (golint)
    • Line 70: warning: exported method Checkouts.Create should have comment or be unexported (golint)
    • Line 96: warning: exported method Checkouts.Update should have comment or be unexported (golint)
    • Line 122: warning: exported method Checkouts.Delete should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/entity/charges.go
    • Line 11: warning: exported type CreateChargeReq should have comment or be unexported (golint)
    • Line 21: warning: exported type CreateChargeMetadata should have comment or be unexported (golint)
    • Line 26: warning: exported type CreateChargePrice should have comment or be unexported (golint)
    • Line 31: warning: exported type CreateChargeResp should have comment or be unexported (golint)
    • Line 44: warning: exported method ShowChargeReq.Validate should have comment or be unexported (golint)
    • Line 60: warning: exported type ShowChargeResp should have comment or be unexported (golint)
    • Line 66: warning: exported type ListChargesReq should have comment or be unexported (golint)
    • Line 70: warning: exported type ListChargesResp should have comment or be unexported (golint)
    • Line 77: warning: exported type CancelChargeReq should have comment or be unexported (golint)
    • Line 82: warning: exported method CancelChargeReq.Validate should have comment or be unexported (golint)
    • Line 98: warning: exported type CancelChargeResp should have comment or be unexported (golint)
    • Line 104: warning: exported type ResolveChargeReq should have comment or be unexported (golint)
    • Line 109: warning: exported method ResolveChargeReq.Validate should have comment or be unexported (golint)
    • Line 125: warning: exported type ResolveChargeResp should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/entity/events.go
    • Line 9: warning: exported type ListEventsReq should have comment or be unexported (golint)
    • Line 13: warning: exported type ListEventsResp should have comment or be unexported (golint)
    • Line 20: warning: exported type ShowEventReq should have comment or be unexported (golint)
    • Line 24: warning: exported method ShowEventReq.Validate should have comment or be unexported (golint)
    • Line 37: warning: exported type ShowEventResp should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/api/invoices.go
    • Line 10: warning: exported function NewInvoices should have comment or be unexported (golint)
    • Line 16: warning: exported type Invoices should have comment or be unexported (golint)
    • Line 20: warning: exported method Invoices.List should have comment or be unexported (golint)
    • Line 45: warning: exported method Invoices.Show should have comment or be unexported (golint)
    • Line 70: warning: exported method Invoices.Create should have comment or be unexported (golint)
    • Line 96: warning: exported method Invoices.Void should have comment or be unexported (golint)
    • Line 122: warning: exported method Invoices.Resolve should have comment or be unexported (golint)
    • coinbase-commerce-go/pkg/api/api.go
    • Line 9: warning: exported const Version should have comment or be unexported (golint)
    • Line 11: warning: exported type ChargesItf should have comment or be unexported (golint)
    • Line 19: warning: exported type CheckoutsItf should have comment or be unexported (golint)
    • Line 27: warning: exported type InvoicesItf should have comment or be unexported (golint)
    • Line 35: warning: exported type EventsItf should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!