package sorting import ( mobilityaccountsstorage "git.coopgo.io/coopgo-platform/mobility-accounts/storage" ) type BeneficiariesByName []mobilityaccountsstorage.Account func (e BeneficiariesByName) Len() int { return len(e) } func (e BeneficiariesByName) Less(i, j int) bool { return e[i].Data["first_name"].(string) < e[j].Data["first_name"].(string) } func (e BeneficiariesByName) Swap(i, j int) { e[i], e[j] = e[j], e[i] }