docker/swarmkit

View on GitHub
api/genericresource/resource_management.go

Summary

Maintainability
A
50 mins
Test Coverage

Function sanitizeResource has 8 return statements (exceeds 4 allowed).
Open

func sanitizeResource(nodeRes []*api.GenericResource, res *api.GenericResource) (ok bool, nrs []*api.GenericResource) {
    switch na := res.Resource.(type) {
    case *api.GenericResource_DiscreteResourceSpec:
        nrs := GetResource(na.DiscreteResourceSpec.Kind, nodeRes)

Severity: Major
Found in api/genericresource/resource_management.go - About 50 mins to fix

    There are no issues that match your filters.

    Category
    Status