@@ -916,7 +916,7 @@ func commaSeparatedTrailers(req *http.Request) (string, error) {
916
916
k = http .CanonicalHeaderKey (k )
917
917
switch k {
918
918
case "Transfer-Encoding" , "Trailer" , "Content-Length" :
919
- return "" , & badStringError { "invalid Trailer key" , k }
919
+ return "" , fmt . Errorf ( "invalid Trailer key %q " , k )
920
920
}
921
921
keys = append (keys , k )
922
922
}
@@ -1394,13 +1394,6 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
1394
1394
}
1395
1395
}
1396
1396
1397
- type badStringError struct {
1398
- what string
1399
- str string
1400
- }
1401
-
1402
- func (e * badStringError ) Error () string { return fmt .Sprintf ("%s %q" , e .what , e .str ) }
1403
-
1404
1397
// requires cc.mu be held.
1405
1398
func (cc * ClientConn ) encodeHeaders (req * http.Request , addGzipHeader bool , trailers string , contentLength int64 ) ([]byte , error ) {
1406
1399
cc .hbuf .Reset ()
@@ -1616,6 +1609,7 @@ func (cc *ClientConn) writeHeader(name, value string) {
1616
1609
}
1617
1610
1618
1611
type resAndError struct {
1612
+ _ incomparable
1619
1613
res * http.Response
1620
1614
err error
1621
1615
}
@@ -1663,6 +1657,7 @@ func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream {
1663
1657
1664
1658
// clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop.
1665
1659
type clientConnReadLoop struct {
1660
+ _ incomparable
1666
1661
cc * ClientConn
1667
1662
closeWhenIdle bool
1668
1663
}
@@ -2479,6 +2474,7 @@ func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {
2479
2474
// gzipReader wraps a response body so it can lazily
2480
2475
// call gzip.NewReader on the first call to Read
2481
2476
type gzipReader struct {
2477
+ _ incomparable
2482
2478
body io.ReadCloser // underlying Response.Body
2483
2479
zr * gzip.Reader // lazily-initialized gzip reader
2484
2480
zerr error // sticky error
0 commit comments