use consistent alias for api/types/registry
Not a fan of aliases, but unfortunately they're sometimes needed. We import both docker/docker/registry and docker/registry and api/types/registry, so I looked for which one to continue using an alias, and this was the one "least" used, and which already used this alias everywhere, except for two places. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/docker/cli/cli/command/formatter"
|
||||
registry "github.com/docker/docker/api/types/registry"
|
||||
registrytypes "github.com/docker/docker/api/types/registry"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -28,7 +28,7 @@ func NewSearchFormat(source string) formatter.Format {
|
||||
}
|
||||
|
||||
// SearchWrite writes the context
|
||||
func SearchWrite(ctx formatter.Context, results []registry.SearchResult) error {
|
||||
func SearchWrite(ctx formatter.Context, results []registrytypes.SearchResult) error {
|
||||
render := func(format func(subContext formatter.SubContext) error) error {
|
||||
for _, result := range results {
|
||||
searchCtx := &searchContext{trunc: ctx.Trunc, s: result}
|
||||
@ -53,7 +53,7 @@ type searchContext struct {
|
||||
formatter.HeaderContext
|
||||
trunc bool
|
||||
json bool
|
||||
s registry.SearchResult
|
||||
s registrytypes.SearchResult
|
||||
}
|
||||
|
||||
func (c *searchContext) MarshalJSON() ([]byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user