1
0
mirror of https://github.com/containers/skopeo.git synced 2026-02-05 12:45:43 +01:00
Files
skopeo/vendor/github.com/moby/moby/client/client_responsehook.go
renovate[bot] 800ea987b3 fix(deps): update common, image, and storage deps to 0e2aefd
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-03 15:28:40 +00:00

24 lines
352 B
Go

package client
import (
"net/http"
)
type responseHookTransport struct {
base http.RoundTripper
hooks []ResponseHook
}
func (t *responseHookTransport) RoundTrip(req *http.Request) (*http.Response, error) {
resp, err := t.base.RoundTrip(req)
if err != nil {
return resp, err
}
for _, h := range t.hooks {
h(resp)
}
return resp, nil
}