portainer/portainer

View on GitHub
api/http/handler/templates/template_file.go

Summary

Maintainability
A
1 hr
Test Coverage

Method Handler.templateFile has 11 return statements (exceeds 4 allowed).
Open

func (handler *Handler) templateFile(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
    id, err := request.RetrieveNumericRouteVariableValue(r, "id")
    if err != nil {
        return httperror.BadRequest("Invalid template identifier", err)
    }
Severity: Major
Found in api/http/handler/templates/template_file.go - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status