Skip to content

Commit

Permalink
Sort operations when processing responses
Browse files Browse the repository at this point in the history
  • Loading branch information
iwysiu committed May 1, 2024
1 parent 8983b00 commit 84583f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/opensearch/lucene_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"regexp"
"slices"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -309,10 +310,12 @@ func getParametersFromServiceMapResult(smResult *client.SearchResponse) ([]strin
}
}
}

operations := make([]string, 0, len(operationMap))
for op := range operationMap {
operations = append(operations, op)
}
slices.Sort(operations)
return services, operations
}

Expand Down

0 comments on commit 84583f2

Please sign in to comment.