Preparing report...

Report for github.com/midtrans/midtrans-go

A    Great!    Found 18 issues across 30 files

Tweet

gofmt90%

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!


golint43%

Golint is a linter for Go source code.

    • midtrans-go/example/simple/iris/sample.go
    • Line 21: warning: exported function GetBalance should have comment or be unexported (golint)
    • Line 29: warning: exported function CreateAndUpdateBeneficiaries should have comment or be unexported (golint)
    • Line 80: warning: exported function GetPayoutDetails should have comment or be unexported (golint)
    • Line 85: warning: exported function CreateAndApprovePayout should have comment or be unexported (golint)
    • Line 100: warning: exported function CreateAndRejectPayout should have comment or be unexported (golint)
    • Line 115: warning: exported function PayoutHistory should have comment or be unexported (golint)
    • Line 122: warning: exported function GetTopUpChannels should have comment or be unexported (golint)
    • Line 127: warning: exported function GetListBeneficiaryBank should have comment or be unexported (golint)
    • Line 132: warning: exported function ValidateBankAccount should have comment or be unexported (golint)
    • midtrans-go/example/simple/transaction/sample.go
    • Line 16: warning: exported function CheckTransaction should have comment or be unexported (golint)
    • Line 24: warning: exported function CheckStatusB2B should have comment or be unexported (golint)
    • Line 32: warning: exported function ApproveTransaction should have comment or be unexported (golint)
    • Line 40: warning: exported function DenyTransaction should have comment or be unexported (golint)
    • Line 48: warning: exported function CancelTransaction should have comment or be unexported (golint)
    • Line 56: warning: exported function ExpireTransaction should have comment or be unexported (golint)
    • Line 64: warning: exported function CaptureTransaction should have comment or be unexported (golint)
    • Line 76: warning: exported function RefundTransaction should have comment or be unexported (golint)
    • Line 89: warning: exported function DirectRefundTransaction should have comment or be unexported (golint)
    • midtrans-go/snap/client.go
    • Line 81: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 108: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • midtrans-go/coreapi/response.go
    • Line 5: warning: exported type ResponseWithMap should have comment or be unexported (golint)
    • Line 21: warning: exported type PaymentAmount should have comment or be unexported (golint)
    • Line 120: warning: exported type TransactionStatusB2bResponse should have comment or be unexported (golint)
    • Line 160: warning: exported type CardTokenResponse should have comment or be unexported (golint)
    • Line 171: warning: exported type CardRegisterResponse should have comment or be unexported (golint)
    • Line 181: warning: exported type BinResponse should have comment or be unexported (golint)
    • Line 196: warning: exported type CreateSubscriptionResponse should have comment or be unexported (golint)
    • Line 214: warning: exported type StatusSubscriptionResponse should have comment or be unexported (golint)
    • Line 216: warning: exported type UpdateSubscriptionResponse should have comment or be unexported (golint)
    • Line 220: warning: exported type EnableSubscriptionResponse should have comment or be unexported (golint)
    • Line 221: warning: exported type DisableSubscriptionResponse should have comment or be unexported (golint)
    • midtrans-go/example/mockup.go
    • Line 11: warning: exported const SandboxServerKey1 should have comment or be unexported (golint)
    • Line 12: warning: exported const SandboxServerKey2 should have comment or be unexported (golint)
    • Line 14: warning: exported const SandboxClientKey2 should have comment or be unexported (golint)
    • Line 17: warning: exported const IrisCreatorKeySandbox should have comment or be unexported (golint)
    • Line 18: warning: exported const IrisApproverKeySandbox should have comment or be unexported (golint)
    • Line 21: warning: exported function SnapParamWithMap should have comment or be unexported (golint)
    • Line 32: warning: exported function SnapParam should have comment or be unexported (golint)
    • Line 42: warning: exported function CoreParam should have comment or be unexported (golint)
    • Line 53: warning: exported function Random should have comment or be unexported (golint)
    • midtrans-go/coreapi/paymenttype.go
    • Line 3: warning: exported type CoreapiPaymentType should have comment or be unexported (golint)
    • Line 4: warning: exported type SubscriptionPaymentType should have comment or be unexported (golint)
    • midtrans-go/coreapi/request.go
    • Line 196: warning: exported type SubscriptionReq should have comment or be unexported (golint)
    • Line 227: warning: exported type GopaySubscriptionDetails should have comment or be unexported (golint)
    • midtrans-go/example/simple/subscriptions/sample.go
    • Line 23: warning: exported function CreateSubscription should have comment or be unexported (golint)
    • Line 56: warning: exported function GetSubscription should have comment or be unexported (golint)
    • Line 67: warning: exported function DisableSubscription should have comment or be unexported (golint)
    • Line 78: warning: exported function EnableSubscription should have comment or be unexported (golint)
    • Line 89: warning: exported function UpdateSubscription should have comment or be unexported (golint)
    • midtrans-go/iris/response.go
    • Line 7: warning: exported type ResponseWithMap should have comment or be unexported (golint)
    • Line 55: warning: exported type TransactionHistoryResponse should have comment or be unexported (golint)
    • Line 103: warning: exported type TopUpAccountResponse should have comment or be unexported (golint)
    • Line 109: warning: exported type BankAccountResponse should have comment or be unexported (golint)
    • Line 117: warning: exported type ListBeneficiaryBankResponse should have comment or be unexported (golint)
    • midtrans-go/httpclient.go
    • Line 14: warning: exported type HttpClient should have comment or be unexported (golint)
    • Line 214: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (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!


misspell96%

Misspell Finds commonly misspelled English words