Skip to content

Commit

Permalink
Adapt to newer exp/slices
Browse files Browse the repository at this point in the history
  • Loading branch information
dupontcy committed Oct 17, 2023
1 parent c45c0c2 commit 5ead1de
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 99 deletions.
5 changes: 3 additions & 2 deletions api/metrics/multi_gatherer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package metrics
import (
"errors"
"fmt"
"strings"
"sync"

"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -91,7 +92,7 @@ func (g *multiGatherer) Register(namespace string, gatherer prometheus.Gatherer)
}

func sortMetrics(m []*dto.MetricFamily) {
slices.SortFunc(m, func(i, j *dto.MetricFamily) bool {
return *i.Name < *j.Name
slices.SortFunc(m, func(i, j *dto.MetricFamily) int {
return strings.Compare(*i.Name, *j.Name)
})
}
52 changes: 28 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ go 1.19

require (
github.com/DataDog/zstd v1.5.2
github.com/Microsoft/go-winio v0.5.2
github.com/Microsoft/go-winio v0.6.1
github.com/NYTimes/gziphandler v1.1.1
github.com/ava-labs/avalanche-network-runner-sdk v0.3.0
github.com/ava-labs/coreth v0.12.5-rc.1
github.com/ava-labs/ledger-avalanche/go v0.0.0-20230105152938-00a24d05a8c7
github.com/btcsuite/btcd/btcutil v1.1.3
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0
github.com/golang-jwt/jwt/v4 v4.3.0
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/golang/mock v1.6.0
github.com/google/btree v1.1.2
github.com/gorilla/mux v1.8.0
github.com/gorilla/rpc v1.2.0
github.com/gorilla/websocket v1.4.2
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/holiman/bloomfilter/v2 v2.0.3
github.com/huin/goupnp v1.0.3
github.com/huin/goupnp v1.3.0
github.com/jackpal/gateway v1.0.6
github.com/jackpal/go-nat-pmp v1.0.2
github.com/leanovate/gopter v0.2.9
Expand All @@ -41,8 +41,8 @@ require (
github.com/spaolacci/murmur3 v1.1.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.8.1
github.com/supranational/blst v0.3.11-0.20230406105308-e9dfc5ee724b
github.com/stretchr/testify v1.8.4
github.com/supranational/blst v0.3.11
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a
github.com/thepudds/fzgen v0.4.2
go.opentelemetry.io/otel v1.11.0
Expand All @@ -53,11 +53,11 @@ require (
go.opentelemetry.io/otel/trace v1.11.0
go.uber.org/goleak v1.2.1
go.uber.org/zap v1.24.0
golang.org/x/crypto v0.1.0
golang.org/x/exp v0.0.0-20230206171751-46f607a40771
golang.org/x/sync v0.1.0
golang.org/x/term v0.7.0
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af
golang.org/x/crypto v0.14.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/sync v0.3.0
golang.org/x/term v0.13.0
golang.org/x/time v0.3.0
gonum.org/v1/gonum v0.11.0
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4
google.golang.org/grpc v1.55.0
Expand All @@ -66,22 +66,23 @@ require (
)

require (
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 // indirect
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 // indirect
github.com/ethereum/go-ethereum v1.12.0 // indirect
github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect
github.com/ethereum/go-ethereum v1.13.4 // indirect
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
Expand All @@ -102,14 +103,14 @@ require (
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/big v0.0.0-20221017200358-a027dc42d04e // indirect
github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/pointerstructure v1.2.0 // indirect
Expand All @@ -120,6 +121,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.39.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sanity-io/litter v1.5.1 // indirect
Expand All @@ -128,10 +130,10 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/status-im/keycard-go v0.2.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/tklauser/go-sysconf v0.3.5 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa // indirect
github.com/urfave/cli/v2 v2.25.7 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
github.com/zondax/hid v0.9.1 // indirect
Expand All @@ -140,12 +142,14 @@ require (
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.13.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/ava-labs/coreth v0.12.5-rc.1 => github.com/taurusgroup/coreth v0.12.5-rc.1-taurus
replace github.com/ava-labs/coreth v0.12.5-rc.1 => github.com/taurusgroup/coreth v0.12.5-rc.1-taurus-slices
Loading

0 comments on commit 5ead1de

Please sign in to comment.