mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-02-04 12:05:57 +00:00
bf9d618ff2
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com> Signed-off-by: Evan Lezar <elezar@nvidia.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] }
|