docker/swarmkit

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

Summary

Maintainability
A
35 mins
Test Coverage

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

func GetNetwork(ctx context.Context, c api.ControlClient, input string) (*api.Network, error) {
    // GetService to match via full ID.
    rg, err := c.GetNetwork(ctx, &api.GetNetworkRequest{NetworkID: input})
    if err != nil {
        // If any error (including NotFound), ListServices to match via full name.
Severity: Major
Found in swarmd/cmd/swarmctl/network/common.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status