portainer/portainer

View on GitHub
api/http/proxy/factory/kubernetes/transport.go

Summary

Maintainability
A
1 hr
Test Coverage

Function newBaseTransport has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

func newBaseTransport(httpTransport *http.Transport, tokenManager *tokenManager, endpoint *portainer.Endpoint, k8sClientFactory *cli.ClientFactory, dataStore dataservices.DataStore) *baseTransport {
Severity: Minor
Found in api/http/proxy/factory/kubernetes/transport.go - About 35 mins to fix

    Function decorateAgentDockerHubRequest has 5 return statements (exceeds 4 allowed).
    Open

    func decorateAgentDockerHubRequest(r *http.Request, dataStore dataservices.DataStore) error {
        requestPath, registryIdString := path.Split(r.URL.Path)
    
        registryID, err := strconv.Atoi(registryIdString)
        if err != nil {
    Severity: Major
    Found in api/http/proxy/factory/kubernetes/transport.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status