Skip to content

Commit

Permalink
sort ruleset by phase
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Fowler committed Jul 18, 2023
1 parent 7b6a648 commit 546f3c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/app/cf-terraforming/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,10 @@ func generateResources() func(cmd *cobra.Command, args []string) {
}
}

sort.Slice(jsonPayload, func(i, j int) bool {
return jsonPayload[i].Phase < jsonPayload[j].Phase
})

resourceCount = len(jsonPayload)
m, _ := json.Marshal(jsonPayload)
err = json.Unmarshal(m, &jsonStructData)
Expand Down

0 comments on commit 546f3c2

Please sign in to comment.