From 2bb70315d34b98b74eecfae52e94d2b5f82fe880 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sat, 17 Apr 2021 14:27:22 +0900 Subject: [PATCH] Use `Header()` instead of deprecated `HeaderMap` `HeaderMap` is deprecated and should avoid to use. Ref: https://golang.org/pkg/net/http/httptest/#ResponseRecorder --- context_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context_test.go b/context_test.go index cf3f0be964..ad1deb0c04 100644 --- a/context_test.go +++ b/context_test.go @@ -1044,7 +1044,7 @@ func TestContextRenderAttachment(t *testing.T) { assert.Equal(t, 200, w.Code) assert.Contains(t, w.Body.String(), "func New() *Engine {") - assert.Equal(t, fmt.Sprintf("attachment; filename=\"%s\"", newFilename), w.HeaderMap.Get("Content-Disposition")) + assert.Equal(t, fmt.Sprintf("attachment; filename=\"%s\"", newFilename), w.Header().Get("Content-Disposition")) } // TestContextRenderYAML tests that the response is serialized as YAML