|
@@ -8,6 +8,7 @@ import (
|
|
|
"log"
|
|
|
"math/rand"
|
|
|
"net/http"
|
|
|
+ "sort"
|
|
|
"strconv"
|
|
|
"sync"
|
|
|
"time"
|
|
@@ -115,6 +116,9 @@ func List(c *gin.Context) {
|
|
|
for _, node := range healthNodes() {
|
|
|
dtoNodes = append(dtoNodes, convert2DtoNode(node))
|
|
|
}
|
|
|
+ sort.SliceStable(dtoNodes, func(i, j int) bool {
|
|
|
+ return dtoNodes[i].CountryCode >= dtoNodes[j].CountryCode
|
|
|
+ })
|
|
|
|
|
|
c.JSON(http.StatusOK, dto.ListResponse{
|
|
|
Response: dto.NewOkResponse(),
|