Handle items newly deprecated in Go 1.11

Remove where possible and ignore staticcheck warnings where we have
to.

Signed-off-by: beorn7 <beorn@soundcloud.com>
This commit is contained in:
beorn7 2018-09-19 13:30:14 +02:00
parent 2c6e80549e
commit 3a6edf5ff8
2 changed files with 8 additions and 1 deletions

View File

@ -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"

View File

@ -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),