| Conditions | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package client |
||
| 29 | func (u *requestCacheTransportDecorator) RoundTrip(r *http.Request) (*http.Response, error) { |
||
| 30 | key := u.keyForRequest(r) |
||
| 31 | |||
| 32 | _, found := u.requestMap.Load(key) |
||
| 33 | if found { |
||
| 34 | return nil, ErrRequestRedundant |
||
| 35 | } |
||
| 36 | |||
| 37 | u.requestMap.Store(key, struct{}{}) |
||
| 38 | |||
| 39 | return u.decorated.RoundTrip(r) |
||
| 40 | } |
||
| 45 |