rl404/go-malscraper

View on GitHub
internal/validator/recommendation.go

Summary

Maintainability
A
35 mins
Test Coverage

Method Validator.GetRecommendation has 5 return statements (exceeds 4 allowed).
Open

func (v *Validator) GetRecommendation(t string, id1, id2 int) (*model.Recommendation, int, error) {
    if t != AnimeType && t != MangaType {
        return nil, http.StatusBadRequest, errors.ErrInvalidType
    }
    if id1 <= 0 || id2 <= 0 {
Severity: Major
Found in internal/validator/recommendation.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status