From 3a6edf5ff83e9a2c373a1b868a39ca9a2a9bb2de Mon Sep 17 00:00:00 2001 From: beorn7 Date: Wed, 19 Sep 2018 13:30:14 +0200 Subject: [PATCH] Handle items newly deprecated in Go 1.11 Remove where possible and ignore staticcheck warnings where we have to. Signed-off-by: beorn7 --- Makefile | 7 +++++++ prometheus/registry_test.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 14d1857..443c360 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,13 @@ include Makefile.common +# http.CloseNotifier is deprecated but we don't want to remove support +# from client_golang to not break anybody still using it. +STATICCHECK_IGNORE = \ + github.com/prometheus/client_golang/prometheus/promhttp/delegator*.go:SA1019 \ + github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go:SA1019 \ + github.com/prometheus/client_golang/prometheus/http.go:SA1019 + .PHONY: get_dep get_dep: @echo ">> getting dependencies" diff --git a/prometheus/registry_test.go b/prometheus/registry_test.go index 5fbe6c9..f37c4ce 100644 --- a/prometheus/registry_test.go +++ b/prometheus/registry_test.go @@ -671,7 +671,7 @@ collected metric named "complex_count" collides with previously collected histog handler(writer, request) for key, value := range scenario.out.headers { - if writer.HeaderMap.Get(key) != value { + if writer.Header().Get(key) != value { t.Errorf( "%d. expected %q for header %q, got %q", i, value, key, writer.Header().Get(key),