mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-10-31 00:55:06 +01:00 
			
		
		
		
	Avoid package cmp to allow builds with golang v1.20
This commit is contained in:
		| @@ -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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user