Skip to content

Commit

Permalink
refactor: call default constructor on empty args
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenschneider committed Sep 15, 2023
1 parent 3fbc133 commit 3ce4565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/checkers/needrestart_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func SetRebootOnSvc(rebootOnSvc bool) func(checker *NeedrestartChecker) error {

func NeedrestartCheckerFromMap(args map[string]any) (*NeedrestartChecker, error) {
if args == nil {
return nil, errors.New("empty args supplied")
return NewNeedrestartChecker()
}

var opts []func(checker *NeedrestartChecker) error
Expand Down

0 comments on commit 3ce4565

Please sign in to comment.