|
|
@ -21,23 +21,23 @@ type options struct { |
|
|
|
|
|
|
|
|
|
|
|
// WithContext with registry context.
|
|
|
|
// WithContext with registry context.
|
|
|
|
func WithContext(ctx context.Context) Option { |
|
|
|
func WithContext(ctx context.Context) Option { |
|
|
|
return Option(func(o *options) { |
|
|
|
return func(o *options) { |
|
|
|
o.ctx = ctx |
|
|
|
o.ctx = ctx |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// WithPath is config path
|
|
|
|
// WithPath is config path
|
|
|
|
func WithPath(p string) Option { |
|
|
|
func WithPath(p string) Option { |
|
|
|
return Option(func(o *options) { |
|
|
|
return func(o *options) { |
|
|
|
o.path = p |
|
|
|
o.path = p |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// WithPrefix is config prefix
|
|
|
|
// WithPrefix is config prefix
|
|
|
|
func WithPrefix(prefix bool) Option { |
|
|
|
func WithPrefix(prefix bool) Option { |
|
|
|
return Option(func(o *options) { |
|
|
|
return func(o *options) { |
|
|
|
o.prefix = prefix |
|
|
|
o.prefix = prefix |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type source struct { |
|
|
|
type source struct { |
|
|
|