1
0
mirror of https://github.com/Luzifer/duplicity-backup.git synced 2024-09-20 16:53:00 +00:00
duplicity-backup/vendor/github.com/onsi/gomega/matchers/attributes_slice.go
Knut Ahlers 6275a80c3f
Deps: Update dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-10-08 15:14:49 +02:00

15 lines
364 B
Go

package matchers
import (
"encoding/xml"
"strings"
)
type attributesSlice []xml.Attr
func (attrs attributesSlice) Len() int { return len(attrs) }
func (attrs attributesSlice) Less(i, j int) bool {
return strings.Compare(attrs[i].Name.Local, attrs[j].Name.Local) == -1
}
func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = attrs[j], attrs[i] }