OLD | NEW |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Bridge package to expose http internals to tests in the http_test | 5 // Bridge package to expose http internals to tests in the http_test |
6 // package. | 6 // package. |
7 | 7 |
8 package http | 8 package http |
9 | 9 |
10 import ( | 10 import ( |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 return len(conns) | 48 return len(conns) |
49 } | 49 } |
50 | 50 |
51 func NewTestTimeoutHandler(handler Handler, ch <-chan time.Time) Handler { | 51 func NewTestTimeoutHandler(handler Handler, ch <-chan time.Time) Handler { |
52 f := func() <-chan time.Time { | 52 f := func() <-chan time.Time { |
53 return ch | 53 return ch |
54 } | 54 } |
55 return &timeoutHandler{handler, f, ""} | 55 return &timeoutHandler{handler, f, ""} |
56 } | 56 } |
| 57 |
| 58 var DefaultUserAgent = defaultUserAgent |
OLD | NEW |