...

Source file src/github.com/onsi/gomega/matchers/attributes_slice.go

Documentation: github.com/onsi/gomega/matchers

     1  package matchers
     2  
     3  import (
     4  	"encoding/xml"
     5  	"strings"
     6  )
     7  
     8  type attributesSlice []xml.Attr
     9  
    10  func (attrs attributesSlice) Len() int { return len(attrs) }
    11  func (attrs attributesSlice) Less(i, j int) bool {
    12  	return strings.Compare(attrs[i].Name.Local, attrs[j].Name.Local) == -1
    13  }
    14  func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = attrs[j], attrs[i] }
    15  

View as plain text