// Less implements sort.Interface and sorts resources by Name.
765413
func (m charmResourceList) Less(i, j int) bool {
	return m[i].Name < m[j].Name
}
1064368
func (s *xorKeySpace) Less(k1, k2 Key) bool {
	return bytes.Compare(k1.Bytes, k2.Bytes) < 0
}
459850
func (n *checkServiceNodeSorter) Less(i, j int) bool {
	return n.Vec[i] < n.Vec[j]
}
1176205
func (p Procedure) Less(o Procedure) bool {
	if p.Service != o.Service {
		return p.Service < o.Service
	}
	if p.Name != o.Name {
		return p.Name < o.Name
	}
	return p.Encoding < o.Encoding
}
1106817
func (hds Heads) Less(i int, j int) bool {
	return hds[i].X() < hds[j].X() || (hds[i].X() == hds[j].X() &&
		hds[i].Y() < hds[j].Y())
}
510313
func (gtcsl TabletCacheStatusList) Less(i, j int) bool {
	iKey := strings.Join([]string{gtcsl[i].Keyspace, gtcsl[i].Shard, string(gtcsl[i].TabletType), gtcsl[i].Name}, ".")
	jKey := strings.Join([]string{gtcsl[j].Keyspace, gtcsl[j].Shard, string(gtcsl[j].TabletType), gtcsl[j].Name}, ".")
	return iKey < jKey
}
757815
func (n *nodeSorter) Less(i, j int) bool {
	return n.Vec[i] < n.Vec[j]
}
1183574
func (arr SortedIPs) Less(i, j int) bool {
	return lessAdrr(arr[i], arr[j])
}
484431
func (slice Sessions) Less(i, j int) bool {
	return slice[i].Created.Before(slice[j].Created)
}
1152287
func (a *aclIterator) Less(i, j int) bool {
	return a.acls[i].ID < a.acls[j].ID
}
1163708
func (routes Routes) Less(i, j int) bool {
	return routes[i].priority < routes[j].priority
}
789371
func Less(s, t string) bool {
	return LessRunes([]rune(s), []rune(t))
}
111109
func (v ValidatorUpdates) Less(i, j int) bool {
	return bytes.Compare(v[i].PubKey.Data, v[j].PubKey.Data) <= 0
}
555187
func (s Int32Slice) Less(i, j int) bool {
	return s[i] < s[j]
}
654533
func (t list) Less(a, b int) bool {
	return t[a].hash < t[b].hash
}
1136330
func Less(orders []Order, a, b Entry) bool {
	for _, cmp := range orders {
		switch cmp.Compare(a, b) {
		case 0:
		case -1:
			return true
		case 1:
			return false
		}
	}

	// This gives us a *stable* sort for free. We don't care
	// preserving the order from the underlying datastore
	// because it's undefined.
	return a.Key < b.Key
}
317455
func (r AbsResourceInstance) Less(o AbsResourceInstance) bool {
	switch {

	case len(r.Module) != len(o.Module):
		return len(r.Module) < len(o.Module)

	case r.Module.String() != o.Module.String():
		return r.Module.Less(o.Module)

	case r.Resource.Resource.Mode != o.Resource.Resource.Mode:
		return r.Resource.Resource.Mode == DataResourceMode

	case r.Resource.Resource.Type != o.Resource.Resource.Type:
		return r.Resource.Resource.Type < o.Resource.Resource.Type

	case r.Resource.Resource.Name != o.Resource.Resource.Name:
		return r.Resource.Resource.Name < o.Resource.Resource.Name

	case r.Resource.Key != o.Resource.Key:
		return InstanceKeyLess(r.Resource.Key, o.Resource.Key)

	default:
		return false

	}
}