File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,11 @@ type Transport struct {
105105 // If true, responses returned from the cache will be given an extra header, X-From-Cache
106106 MarkCachedResponses bool
107107
108- // AroundRoundTrip is an optional func.
109- // If set, the Transport will call AroundRoundTrip at the start of RoundTrip
108+ // Around is an optional func.
109+ // If set, the Transport will call Around at the start of RoundTrip
110110 // and defer the returned func until the end of RoundTrip.
111111 // Typically used to implement a lock that is held for the duration of the RoundTrip.
112- AroundRoundTrip func (key string ) func ()
112+ Around func (key string ) func ()
113113}
114114
115115// varyMatches will return false unless all of the cached values for the headers listed in Vary
@@ -134,7 +134,7 @@ func varyMatches(cachedResp *http.Response, req *http.Request) bool {
134134// will be returned.
135135func (t * Transport ) RoundTrip (req * http.Request ) (resp * http.Response , err error ) {
136136 cacheKey := cacheKey (req )
137- if f := t .AroundRoundTrip ; f != nil {
137+ if f := t .Around ; f != nil {
138138 defer f (cacheKey )()
139139 }
140140 cacheable := (req .Method == "GET" || req .Method == "HEAD" ) && req .Header .Get ("range" ) == ""
You can’t perform that action at this time.
0 commit comments