mirror of
https://github.com/prometheus/prometheus.git
synced 2025-07-03 11:03:25 +00:00
A few re-organizations.
This commit is contained in:
parent
43aeba2699
commit
c0ce859c76
4 changed files with 134 additions and 120 deletions
|
@ -26,7 +26,7 @@ func (s Set) Remove(v interface{}) {
|
|||
func (s Set) Elements() []interface{} {
|
||||
result := make([]interface{}, 0, len(s))
|
||||
|
||||
for k, _ := range s {
|
||||
for k := range s {
|
||||
result = append(result, k)
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ func (s Set) Has(v interface{}) bool {
|
|||
func (s Set) Intersection(o Set) Set {
|
||||
result := make(Set)
|
||||
|
||||
for k, _ := range s {
|
||||
for k := range s {
|
||||
if o.Has(k) {
|
||||
result[k] = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue