Skip to content

Commit

Permalink
Don't allocate mem
Browse files Browse the repository at this point in the history
  • Loading branch information
sourishkrout committed Jul 16, 2024
1 parent 79889c4 commit d96c701
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/owl/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ func (s *ComplexOperationSet) validate() (ValidationErrors, error) {
return nil, fmt.Errorf("complex item not found: %s", itemKey)
}

data := make(map[string]interface{}, 1)
rules := make(map[string]interface{}, 1)

if val.Value.Resolved == "" && !item.Required {
continue
}

data := make(map[string]interface{}, 1)
rules := make(map[string]interface{}, 1)

data[val.Var.Key] = val.Value.Resolved
rules[val.Var.Key] = item.Rules

Expand Down

0 comments on commit d96c701

Please sign in to comment.