File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 55 "fmt"
66 "github.com/SpectoLabs/hoverfly/core/templating"
77 "regexp"
8+ "sort"
89
910 "github.com/SpectoLabs/hoverfly/core/action"
1011 "github.com/SpectoLabs/hoverfly/core/delay"
@@ -465,7 +466,19 @@ func (hf *Hoverfly) GetFilteredDiff(diffFilterView v2.DiffFilterView) map[v2.Sim
465466
466467func (hf * Hoverfly ) GetAllPostServeActions () v2.PostServeActionDetailsView {
467468 var actions []v2.ActionView
468- for actionName , action := range hf .PostServeActionDetails .Actions {
469+ actionNames := make ([]string , 0 , len (hf .PostServeActionDetails .Actions ))
470+
471+ // Collect all action names
472+ for actionName := range hf .PostServeActionDetails .Actions {
473+ actionNames = append (actionNames , actionName )
474+ }
475+
476+ // Sort action names to enforce natural order
477+ sort .Strings (actionNames )
478+
479+ // Append actions in sorted order
480+ for _ , actionName := range actionNames {
481+ action := hf .PostServeActionDetails .Actions [actionName ]
469482 actions = append (actions , action .GetActionView (actionName ))
470483 }
471484
You can’t perform that action at this time.
0 commit comments