mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-24 07:10:20 +00:00
d300da19b7
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
15 lines
364 B
Go
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] }
|