aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2025-06-10 12:26:03 -0400
committerGopher Robot <gobot@golang.org>2025-06-10 11:09:07 -0700
commit1cafdfb63bb9b8825c5f4143d154bce3b82ed6a1 (patch)
treec416fe12abefe398ac87e60c08922200177ec881 /src/os/exec
parenta35701b3525ccd140995a216758760c60e7c58d7 (diff)
downloadgo-1cafdfb63bb9b8825c5f4143d154bce3b82ed6a1.tar.xz
net/http: make the zero value of CrossOriginProtection work
Currently, CrossOriginProtection must be constructed by NewCrossOriginProtection. If you try to use the zero value, most methods will panic with a nil dereference. This CL makes CrossOriginProtection use on-demand initialization instead, so the zero value has the same semantics as the value currently returned by NewCrossOriginProtection. Now, NewCrossOriginProtection just constructs the zero value. We keep NewCrossOriginProtection by analogy to NewServeMux. Updates #73626 Fixes #74089. Change-Id: Ia80183eb6bfdafb0e002271c0b25c2d6230a159a Reviewed-on: https://go-review.googlesource.com/c/go/+/680396 Auto-Submit: Austin Clements <austin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/os/exec')
0 files changed, 0 insertions, 0 deletions