arnaucube
arnaucube/mirror-to-giteaPublic Self-hosted repository
mirror-to-gitea/vendor/github.com/onsi/gomega/matchers/attributes_slice.go
vendor/github.com/onsi/gomega/matchers/attributes_slice.goRaw
 1package matchers
 2
 3import (
 4	"encoding/xml"
 5	"strings"
 6)
 7
 8type attributesSlice []xml.Attr
 9
10func (attrs attributesSlice) Len() int { return len(attrs) }
11func (attrs attributesSlice) Less(i, j int) bool {
12	return strings.Compare(attrs[i].Name.Local, attrs[j].Name.Local) == -1
13}
14func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = attrs[j], attrs[i] }