Preparing report...

Report for github.com/voyago/converter

A+    Excellent!    Found 17 issues across 24 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!


golint33%

Golint is a linter for Go source code.

    • converter/pkg/store/store.go
    • Line 12: warning: exported type Store should have comment or be unexported (golint)
    • Line 18: warning: exported function Make should have comment or be unexported (golint)
    • Line 31: warning: exported method Store.ExchangeRates should have comment or be unexported (golint)
    • Line 40: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • converter/pkg/model/currencies.go
    • Line 8: warning: exported type Currencies should have comment or be unexported (golint)
    • Line 12: warning: exported function MakeCurrencies should have comment or be unexported (golint)
    • Line 18: warning: exported method Currencies.Add should have comment or be unexported (golint)
    • Line 22: warning: exported method Currencies.Find should have comment or be unexported (golint)
    • Line 34: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 37: warning: exported method Currencies.Forget should have comment or be unexported (golint)
    • Line 51: warning: exported method Currencies.All should have comment or be unexported (golint)
    • Line 55: warning: exported method Currencies.Count should have comment or be unexported (golint)
    • Line 66: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • converter/pkg/support/strings.go
    • Line 8: warning: exported type Strings should have comment or be unexported (golint)
    • Line 12: warning: exported method Strings.RightPad should have comment or be unexported (golint)
    • Line 20: warning: exported method Strings.ToInt64 should have comment or be unexported (golint)
    • converter/pkg/store/blueprint/currencies.go
    • Line 9: warning: exported type Blueprint should have comment or be unexported (golint)
    • Line 13: warning: exported function MakeCurrenciesBlueprint should have comment or be unexported (golint)
    • Line 24: warning: exported method Blueprint.SourcePath should have comment or be unexported (golint)
    • Line 31: warning: exported method Blueprint.Items should have comment or be unexported (golint)
    • converter/pkg/store/handler/currencyLayer/mock.go
    • Line 1: warning: don't use MixedCaps in package name; currencyLayer should be currencylayer (golint)
    • Line 13: warning: exported type Mock should have comment or be unexported (golint)
    • Line 19: warning: exported method Mock.ExchangeRates should have comment or be unexported (golint)
    • Line 46: warning: exported method Mock.ApiKey should have comment or be unexported (golint)
    • Line 50: warning: exported method Mock.FetchRates should have comment or be unexported (golint)
    • converter/environment/env.go
    • Line 10: warning: exported const FileName should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type Env should have comment or be unexported (golint)
    • Line 21: warning: exported function Make should have comment or be unexported (golint)
    • Line 27: warning: exported function MakeWith should have comment or be unexported (golint)
    • Line 33: warning: exported method Env.Get should have comment or be unexported (golint)
    • Line 44: warning: exported method Env.IsLive should have comment or be unexported (golint)
    • Line 48: warning: exported method Env.IsTest should have comment or be unexported (golint)
    • Line 52: warning: exported method Env.GetRootDir should have comment or be unexported (golint)
    • Line 74: 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)
    • converter/pkg/conversion/converter.go
    • Line 8: warning: exported type Converter should have comment or be unexported (golint)
    • Line 12: warning: exported function Make should have comment or be unexported (golint)
    • Line 16: warning: exported method Converter.Convert should have comment or be unexported (golint)
    • Line 32: warning: exported function ConvertTo should have comment or be unexported (golint)
    • converter/pkg/model/currency.go
    • Line 7: warning: exported type Currency should have comment or be unexported (golint)
    • Line 15: warning: exported method Currency.Multiplier should have comment or be unexported (golint)
    • Line 26: warning: exported method Currency.ToRatePrice should have comment or be unexported (golint)
    • converter/pkg/store/request.go
    • Line 5: warning: exported const CurrencyLayerDriverName should have comment or be unexported (golint)
    • Line 7: warning: exported type Request should have comment or be unexported (golint)
    • Line 13: warning: exported function NewCurrencyLayerRequest should have comment or be unexported (golint)
    • Line 21: warning: exported method Request.GetEnv should have comment or be unexported (golint)
    • Line 25: warning: exported method Request.GetDriver should have comment or be unexported (golint)
    • Line 29: warning: exported method Request.GetSource should have comment or be unexported (golint)
    • converter/pkg/model/price.go
    • Line 9: warning: exported type Price should have comment or be unexported (golint)
    • Line 14: warning: exported method Price.ToFloat should have comment or be unexported (golint)
    • Line 21: warning: exported method Price.ToString should have comment or be unexported (golint)
    • Line 25: warning: exported function MakePrice should have comment or be unexported (golint)
    • Line 42: 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 46: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • converter/pkg/store/handler/currencyLayer/handler.go
    • Line 1: warning: don't use MixedCaps in package name; currencyLayer should be currencylayer (golint)
    • Line 14: warning: exported const ApiEndpoint should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Handler should have comment or be unexported (golint)
    • Line 24: warning: exported method Handler.ExchangeRates should have comment or be unexported (golint)
    • Line 51: warning: exported method Handler.FetchRates should have comment or be unexported (golint)
    • Line 83: warning: exported method Handler.BaseUrl should have comment or be unexported (golint)
    • Line 87: warning: exported method Handler.ApiKey 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!


misspell95%

Misspell Finds commonly misspelled English words