( out io.Writer, certFile, keyFile, caFile string, insecureSkipTLSVerify, plainHTTP bool, username, password string, )
| 403 | } |
| 404 | |
| 405 | func newRegistryClient( |
| 406 | out io.Writer, certFile, keyFile, caFile string, insecureSkipTLSVerify, plainHTTP bool, username, password string, |
| 407 | ) (*registry.Client, error) { |
| 408 | if certFile != "" && keyFile != "" || caFile != "" || insecureSkipTLSVerify { |
| 409 | registryClient, err := newRegistryClientWithTLS(out, certFile, keyFile, caFile, insecureSkipTLSVerify, username, password) |
| 410 | if err != nil { |
| 411 | return nil, err |
| 412 | } |
| 413 | return registryClient, nil |
| 414 | } |
| 415 | registryClient, err := newDefaultRegistryClient(out, plainHTTP, username, password) |
| 416 | if err != nil { |
| 417 | return nil, err |
| 418 | } |
| 419 | return registryClient, nil |
| 420 | } |
| 421 | |
| 422 | func newDefaultRegistryClient(out io.Writer, plainHTTP bool, username, password string) (*registry.Client, error) { |
| 423 | opts := []registry.ClientOption{ |
no test coverage detected
searching dependent graphs…