blog: update the context blog to not use deprecated method #29075
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputGOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hao.dong/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hao.dong/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qf/md348s5d0yq2m339m49gjrwh0000gp/T/go-build713354838=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
What did you expect to see?
The CancelRequest() method of type *http.Transport is deprecated now. As https://golang.org/pkg/net/http/#Transport.CancelRequest suggested Use Request.WithContext to create a request with a cancelable context instead. Could we just update the httpDo like this:
What did you see instead?
The text was updated successfully, but these errors were encountered: