add short circuit return

Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
pull/30570/head
Scott Rigby 7 months ago
parent 5367001f4f
commit 3cd6afe845
No known key found for this signature in database
GPG Key ID: C7C6FBB5B91C1155

@ -181,7 +181,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