mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-03 18:25:07 +01:00 
			
		
		
		
	Avoid package cmp to allow builds with golang v1.20
This commit is contained in:
		@@ -2,7 +2,6 @@ package sinks
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"bytes"
 | 
						"bytes"
 | 
				
			||||||
	"cmp"
 | 
					 | 
				
			||||||
	"encoding/json"
 | 
						"encoding/json"
 | 
				
			||||||
	"errors"
 | 
						"errors"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
@@ -102,7 +101,13 @@ func (s *HttpSink) Write(m lp.CCMetric) error {
 | 
				
			|||||||
	slices.SortFunc(
 | 
						slices.SortFunc(
 | 
				
			||||||
		key_value_store,
 | 
							key_value_store,
 | 
				
			||||||
		func(a key_value, b key_value) int {
 | 
							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 {
 | 
						for i := range key_value_store {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user