batazor/go-auth

View on GitHub
utils/recaptcha/recaptcha.go

Summary

Maintainability
A
40 mins
Test Coverage

Function VerifyCaptcha has 6 return statements (exceeds 4 allowed).
Open

func VerifyCaptcha(captchaResponse []byte) error {
    var captcha Captcha
    err := json.Unmarshal(captchaResponse, &captcha)
    if err != nil {
        return err
Severity: Major
Found in utils/recaptcha/recaptcha.go - About 40 mins to fix

    exported var RECAPTCHA_PRIVATE_KEY should have comment or be unexported
    Open

        RECAPTCHA_PRIVATE_KEY string
    Severity: Minor
    Found in utils/recaptcha/recaptcha.go by golint

    exported function VerifyCaptcha should have comment or be unexported
    Open

    func VerifyCaptcha(captchaResponse []byte) error {
    Severity: Minor
    Found in utils/recaptcha/recaptcha.go by golint

    don't use ALL_CAPS in Go names; use CamelCase
    Open

        RECAPTCHA_PRIVATE_KEY string
    Severity: Minor
    Found in utils/recaptcha/recaptcha.go by golint

    There are no issues that match your filters.

    Category
    Status