alibaba/kt-connect

View on GitHub
pkg/kt/command/general/lock.go

Summary

Maintainability
A
35 mins
Test Coverage

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

func LockService(serviceName, namespace string, times int) (*coreV1.Service, error) {
    if times > 10 {
        return nil, fmt.Errorf("failed to obtain kt lock of service %s, please try again later", serviceName)
    }
    svc, err := cluster.Ins().GetService(serviceName, namespace)
Severity: Major
Found in pkg/kt/command/general/lock.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status