pkg/kt/command/general/lock.go
Function LockService
has 5 return statements (exceeds 4 allowed). Open
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)