all repos

rss-tools @ a5ac52722b131734c74504b6e6f4d9900536cac7

get rss feed from sources that(i need and) dont provide one

rss-tools/vendor/github.com/andybalholm/cascadia/specificity.go (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
we're vendoring now, 7 days ago
1
package cascadia
2
3
// Specificity is the CSS specificity as defined in
4
// https://www.w3.org/TR/selectors/#specificity-rules
5
// with the convention Specificity = [A,B,C].
6
type Specificity [3]int
7
8
// returns `true` if s < other (strictly), false otherwise
9
func (s Specificity) Less(other Specificity) bool {
10
	for i := range s {
11
		if s[i] < other[i] {
12
			return true
13
		}
14
		if s[i] > other[i] {
15
			return false
16
		}
17
	}
18
	return false
19
}
20
21
func (s Specificity) Add(other Specificity) Specificity {
22
	for i, sp := range other {
23
		s[i] += sp
24
	}
25
	return s
26
}