initialize registry client in oci getter

Signed-off-by: Alex Sears <me@alexsears.com>
pull/9409/head
Alex Sears 4 years ago
parent ea5d5b64b9
commit 2d16a8135b
No known key found for this signature in database
GPG Key ID: C5830CA0D9202CBF

@ -58,10 +58,19 @@ func (g *OCIGetter) get(href string) (*bytes.Buffer, error) {
} }
// NewOCIGetter constructs a valid http/https client as a Getter // NewOCIGetter constructs a valid http/https client as a Getter
func NewOCIGetter(options ...Option) (Getter, error) { func NewOCIGetter(ops ...Option) (Getter, error) {
var client OCIGetter registryClient, err := registry.NewClient()
if err != nil {
return nil, err
}
for _, opt := range options { client := OCIGetter{
opts: options{
registryClient: registryClient,
},
}
for _, opt := range ops {
opt(&client.opts) opt(&client.opts)
} }

Loading…
Cancel
Save