add short circuit return

Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
pull/10309/head
Scott Rigby 7 months ago committed by Chris Berry
parent 243cb2e21f
commit f729b9ade0

@ -180,7 +180,9 @@ func hookHasDeletePolicy(h *release.Hook, policy release.HookDeletePolicy) bool
// outputLogsByPolicy outputs a pods logs if the hook policy instructs it to // outputLogsByPolicy outputs a pods logs if the hook policy instructs it to
func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace string, policy release.HookOutputLogPolicy) error { func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace string, policy release.HookOutputLogPolicy) error {
if hookHasOutputLogPolicy(h, policy) { if !hookHasOutputLogPolicy(h, policy) {
return nil
}
namespace, err := cfg.deriveNamespace(h, releaseNamespace) namespace, err := cfg.deriveNamespace(h, releaseNamespace)
if err != nil { if err != nil {
return err return err

Loading…
Cancel
Save