]> Cypherpunks repositories - gostls13.git/commit
net/http: simplify http.Request.Clone
authorJes Cok <xigua67damn@gmail.com>
Mon, 26 Aug 2024 13:33:06 +0000 (13:33 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 27 Aug 2024 17:40:39 +0000 (17:40 +0000)
commit994d1d446663873dd593846a0b94147410e5922a
tree5b85d988bf1fa25ac443f19e6676905278e77543
parent61e00ae134193b8db6c5a3083b51d5bc2c15e18f
net/http: simplify http.Request.Clone

By using maps.Clone and omitting nil checks when calling
http.Header.Clone.

I'm not using slices.Clone because the result of slices.Clone
may have additional unused capacity.

Change-Id: I4aed0fea218404c7270e35324e6bd62d855296c7
GitHub-Last-Rev: 9fd5dd59078c69c9a8057f6fc4a90f7c6aac893b
GitHub-Pull-Request: golang/go#69070
Reviewed-on: https://go-review.googlesource.com/c/go/+/608295
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/net/http/request.go