Skip to content

Commit

Permalink
Update util/lua/lua.go
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Ashu <[email protected]>

Update util/lua/lua.go

Co-authored-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Ashu <[email protected]>
  • Loading branch information
ashutosh16 and agaudreault committed Sep 10, 2024
1 parent da1ffbe commit bca97af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/lua/lua.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (vm VM) ExecuteResourceActionDiscovery(obj *unstructured.Unstructured, scri
availableActionsMap := make(map[string]interface{})
err = json.Unmarshal(jsonBytes, &availableActionsMap)
if err != nil {
return nil, fmt.Errorf("error in converting to lua table: %w", err)
return nil, fmt.Errorf("error in unmarshaling lua table: %w", err)
}
for key, value := range availableActionsMap {
resourceAction := appv1.ResourceAction{Name: key, Disabled: isActionDisabled(value)}
Expand All @@ -317,7 +317,7 @@ func (vm VM) ExecuteResourceActionDiscovery(obj *unstructured.Unstructured, scri

err = json.Unmarshal(resourceActionBytes, &resourceAction)
if err != nil {
return nil, fmt.Errorf("error marshaling resource action: %w", err)
return nil, fmt.Errorf("error unmarshaling resource action: %w", err)
}
availableActions = append(availableActions, resourceAction)
}
Expand Down

0 comments on commit bca97af

Please sign in to comment.