docker/swarmkit

View on GitHub
swarmd/cmd/swarmctl/cluster/common.go

Summary

Maintainability
A
35 mins
Test Coverage

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

func getCluster(ctx context.Context, c api.ControlClient, input string) (*api.Cluster, error) {
    rg, err := c.GetCluster(ctx, &api.GetClusterRequest{ClusterID: input})
    if err == nil {
        return rg.Cluster, nil
    }
Severity: Major
Found in swarmd/cmd/swarmctl/cluster/common.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status