Solidarity transport
This commit is contained in:
13
utils/sorting/solidarity-drivers.go
Normal file
13
utils/sorting/solidarity-drivers.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package sorting
|
||||
|
||||
import (
|
||||
mobilityaccountsstorage "git.coopgo.io/coopgo-platform/mobility-accounts/storage"
|
||||
)
|
||||
|
||||
type SolidarityDriversByName []mobilityaccountsstorage.Account
|
||||
|
||||
func (e SolidarityDriversByName) Len() int { return len(e) }
|
||||
func (e SolidarityDriversByName) Less(i, j int) bool {
|
||||
return e[i].Data["first_name"].(string) < e[j].Data["first_name"].(string)
|
||||
}
|
||||
func (e SolidarityDriversByName) Swap(i, j int) { e[i], e[j] = e[j], e[i] }
|
||||
Reference in New Issue
Block a user