mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Avoid package cmp to allow builds with golang v1.20
This commit is contained in:
parent
8da5c692bb
commit
75b705aa87
@ -2,7 +2,6 @@ package sinks
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"cmp"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
@ -102,7 +101,13 @@ func (s *HttpSink) Write(m lp.CCMetric) error {
|
||||
slices.SortFunc(
|
||||
key_value_store,
|
||||
func(a key_value, b key_value) int {
|
||||
return cmp.Compare(a.key, b.key)
|
||||
if a.key < b.key {
|
||||
return -1
|
||||
}
|
||||
if a.key > b.key {
|
||||
return +1
|
||||
}
|
||||
return 0
|
||||
},
|
||||
)
|
||||
for i := range key_value_store {
|
||||
|
Loading…
Reference in New Issue
Block a user