portainer/portainer

View on GitHub
api/http/handler/endpoints/endpoint_list.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Handler.endpointList has 56 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (handler *Handler) endpointList(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
    start, _ := request.RetrieveNumericQueryParameter(r, "start", true)
    if start != 0 {
        start--
    }
Severity: Minor
Found in api/http/handler/endpoints/endpoint_list.go - About 1 hr to fix

    Method Handler.endpointList has 9 return statements (exceeds 4 allowed).
    Open

    func (handler *Handler) endpointList(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
        start, _ := request.RetrieveNumericQueryParameter(r, "start", true)
        if start != 0 {
            start--
        }
    Severity: Major
    Found in api/http/handler/endpoints/endpoint_list.go - About 55 mins to fix

      There are no issues that match your filters.

      Category
      Status