Skip to content

Commit

Permalink
replaced HeaderMap as it's deprecated (quii#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
enkeyz authored Jun 11, 2022
1 parent 1a16e4f commit 95e65cd
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion command-line/v1/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion command-line/v2/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion command-line/v3/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v1/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v2/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v3/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v4/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v5/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v6/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v7/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v8/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/v9/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion time/v1/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion time/v2/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion time/v3/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestLeague(t *testing.T) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion websockets/v1/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func writeWSMessage(t testing.TB, conn *websocket.Conn, message string) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down
2 changes: 1 addition & 1 deletion websockets/v2/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func writeWSMessage(t testing.TB, conn *websocket.Conn, message string) {
func assertContentType(t testing.TB, response *httptest.ResponseRecorder, want string) {
t.Helper()
if response.Header().Get("content-type") != want {
t.Errorf("response did not have content-type of %s, got %v", want, response.HeaderMap)
t.Errorf("response did not have content-type of %s, got %v", want, response.Result().Header)
}
}

Expand Down

0 comments on commit 95e65cd

Please sign in to comment.