Skip to content
Myr

Use `Header()` instead of deprecated `HeaderMap` (#2694)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by y-yagi · committed by GitHub · parent 77649bc · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:context_test.go+1 added-1 removed
1046 unmodified lines
1047 c.FileAttachment("./gin.go", newFilename)10481049 assert.Equal(t, 200, w.Code)1050 assert.Contains(t, w.Body.String(), "func New() *Engine {")1051 assert.Equal(t, fmt.Sprintf("attachment; filename=\"%s\"", newFilename), w.HeaderMap.Get("Content-Disposition"))1051 assert.Equal(t, fmt.Sprintf("attachment; filename=\"%s\"", newFilename), w.Header().Get("Content-Disposition"))1052}10531054// TestContextRenderYAML tests that the response is serialized as YAML1055// and Content-Type is set to application/x-yaml
1001 unmodified lines