(insecureSkipVerify bool, registryAuth string)
| 87 | } |
| 88 | |
| 89 | func newTransportWithRegistryAuth(insecureSkipVerify bool, registryAuth string) *transportWithRegistryAuth { |
| 90 | baseTransport := http.DefaultTransport.(*http.Transport).Clone() |
| 91 | baseTransport.TLSClientConfig.InsecureSkipVerify = insecureSkipVerify |
| 92 | return &transportWithRegistryAuth{ |
| 93 | baseTransport: baseTransport, |
| 94 | registryAuth: registryAuth, |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | func (t *transportWithRegistryAuth) RoundTrip(req *http.Request) (resp *http.Response, err error) { |
| 99 | req.Header.Set("Authorization", "Bearer "+t.registryAuth) |
no outgoing calls
no test coverage detected