1
0
mirror of https://github.com/umputun/reproxy.git synced 2025-11-29 22:08:14 +02:00

sort mappers in the list

This commit is contained in:
Umputun
2021-04-14 02:47:35 -05:00
parent 78ef60947b
commit 47d802679d

View File

@@ -130,6 +130,9 @@ func (s *Service) Mappers() (mappers []URLMapper) {
for _, m := range s.mappers {
mappers = append(mappers, m...)
}
sort.Slice(mappers, func(i, j int) bool {
return len(mappers[i].SrcMatch.String()) > len(mappers[j].SrcMatch.String())
})
return mappers
}