Skip to content

Commit

Permalink
Use panic instead
Browse files Browse the repository at this point in the history
Signed-off-by: clyang82 <chuyang@redhat.com>
  • Loading branch information
clyang82 committed May 26, 2023
1 parent 2d4db2e commit 6aabb25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions controllers/configurationpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"context"
"errors"
"fmt"
"os"
"reflect"
"sort"
"strconv"
Expand Down Expand Up @@ -1111,7 +1110,7 @@ func (r *ConfigurationPolicyReconciler) handleObjectTemplates(plc policyv1.Confi

unstruct, err := unmarshalFromJSON(objectT.ObjectDefinition.Raw)
if err != nil {
os.Exit(1)
panic(err)
}

// iterate through all namespaces the configurationpolicy is set on
Expand Down

0 comments on commit 6aabb25

Please sign in to comment.