(prefix string)
| 54 | type NewBackendOpt func(*Backend) |
| 55 | |
| 56 | func WithPrefix(prefix string) NewBackendOpt { |
| 57 | return func(b *Backend) { |
| 58 | b.prefix = prefix |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | func NewBackend(repository string, regOpts *RegistryOptions, opts ...NewBackendOpt) (*Backend, error) { |
| 63 | b := &Backend{ |