feat: support baggage propagation in httpc (#2375)

* feat: support baggage propagation in httpc

* chore: use go 1.16

* chore: use go 1.16

* chore: use go ^1.16

* chore: remove deprecated
This commit is contained in:
Kevin Wan
2022-09-10 15:18:52 +08:00
committed by GitHub
parent 590d784800
commit d935c83a54
44 changed files with 141 additions and 154 deletions

View File

@@ -2,7 +2,7 @@ package handler
import (
"bytes"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"strings"
@@ -19,7 +19,7 @@ func TestGunzipHandler(t *testing.T) {
var wg sync.WaitGroup
wg.Add(1)
handler := GunzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
assert.Nil(t, err)
assert.Equal(t, string(body), message)
wg.Done()
@@ -39,7 +39,7 @@ func TestGunzipHandler_NoGzip(t *testing.T) {
var wg sync.WaitGroup
wg.Add(1)
handler := GunzipHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
assert.Nil(t, err)
assert.Equal(t, string(body), message)
wg.Done()