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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user