diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2020-04-30 09:03:55 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2020-05-01 05:30:49 +0000 |
| commit | b8fd3cab3944d5dd5f2a50f3cc131b1048897ee1 (patch) | |
| tree | 048d5c6acfed8c3a7204540fc9ad225c079ea0e5 /src/net/http/http.go | |
| parent | e1d16843bdbf85c99bc963b7a343cbffa047e378 (diff) | |
| download | go-b8fd3cab3944d5dd5f2a50f3cc131b1048897ee1.tar.xz | |
net/http: remove badStringError, make some unexported structs non-comparable
Reduces binary size by 4K, not counting the http2 changes (in CL
231119) that'll be bundled into this package in the future.
Updates golang/go#38782
Change-Id: Id360348707e076b8310a8f409e412d68dd2394b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/231118
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/net/http/http.go')
| -rw-r--r-- | src/net/http/http.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/http/http.go b/src/net/http/http.go index 89e86d80e8..4c5054b399 100644 --- a/src/net/http/http.go +++ b/src/net/http/http.go @@ -16,6 +16,11 @@ import ( "golang.org/x/net/http/httpguts" ) +// incomparable is a zero-width, non-comparable type. Adding it to a struct +// makes that struct also non-comparable, and generally doesn't add +// any size (as long as it's first). +type incomparable [0]func() + // maxInt64 is the effective "infinite" value for the Server and // Transport's byte-limiting readers. const maxInt64 = 1<<63 - 1 |
