restartmanager/restartmanager.go
Method RestartManager.ShouldRestart
has 63 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (rm *RestartManager) ShouldRestart(exitCode uint32, hasBeenManuallyStopped bool, executionDuration time.Duration) (bool, chan error, error) {
if rm.policy.IsNone() {
return false, nil, nil
}
rm.Lock()
Method RestartManager.ShouldRestart
has 5 return statements (exceeds 4 allowed). Open
Open
func (rm *RestartManager) ShouldRestart(exitCode uint32, hasBeenManuallyStopped bool, executionDuration time.Duration) (bool, chan error, error) {
if rm.policy.IsNone() {
return false, nil, nil
}
rm.Lock()