remove pkg/registries

Pull the trigger on the `pkg/registries` package which acted as a proxy
for `c/image/pkg/sysregistriesv2`.  Callers should be using the packages
from c/image directly, if needed at all.

Also make use of libimage's SystemContext() method which returns a copy
of a system context, further reducing the risk of unintentionally
altering global data.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2021-06-24 14:35:10 +02:00
parent d1f57a07c2
commit f95b0995e5
12 changed files with 52 additions and 181 deletions

View File

@ -53,6 +53,11 @@ type Runtime struct {
systemContext types.SystemContext
}
// Returns a copy of the runtime's system context.
func (r *Runtime) SystemContext() *types.SystemContext {
return r.systemContextCopy()
}
// Returns a copy of the runtime's system context.
func (r *Runtime) systemContextCopy() *types.SystemContext {
var sys types.SystemContext