From 05042ce4723297f1fceabd2d7b928ff543537dfb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 23 Sep 2022 22:31:33 +0200 Subject: [PATCH] daemon/images: fix empty-lines (revive) daemon/images/image_squash.go:17:71: empty-lines: extra empty line at the start of a block (revive) daemon/images/store.go:128:27: empty-lines: extra empty line at the end of a block (revive) daemon/images/image_list.go:154:55: empty-lines: extra empty line at the start of a block (revive) daemon/images/image_delete.go:135:13: empty-lines: extra empty line at the end of a block (revive) daemon/images/image_search.go:25:64: empty-lines: extra empty line at the start of a block (revive) Signed-off-by: Sebastiaan van Stijn --- daemon/images/image_delete.go | 1 - daemon/images/image_list.go | 1 - daemon/images/image_search.go | 1 - daemon/images/image_squash.go | 1 - daemon/images/store.go | 1 - 5 files changed, 5 deletions(-) diff --git a/daemon/images/image_delete.go b/daemon/images/image_delete.go index d20de8dae9..de6a5c428a 100644 --- a/daemon/images/image_delete.go +++ b/daemon/images/image_delete.go @@ -134,7 +134,6 @@ func (i *ImageService) ImageDelete(ctx context.Context, imageRef string, force, records = append(records, untaggedRecord) } else { remainingRefs = append(remainingRefs, repoRef) - } } repoRefs = remainingRefs diff --git a/daemon/images/image_list.go b/daemon/images/image_list.go index f898f7249a..f8dd2eb3b1 100644 --- a/daemon/images/image_list.go +++ b/daemon/images/image_list.go @@ -152,7 +152,6 @@ func (i *ImageService) Images(ctx context.Context, opts types.ImageListOptions) } if summary.RepoDigests == nil && summary.RepoTags == nil { if opts.All || len(i.imageStore.Children(id)) == 0 { - if opts.Filters.Contains("dangling") && !danglingOnly { // dangling=false case, so dangling image is not needed continue diff --git a/daemon/images/image_search.go b/daemon/images/image_search.go index 86b897964c..c824577cca 100644 --- a/daemon/images/image_search.go +++ b/daemon/images/image_search.go @@ -23,7 +23,6 @@ var acceptedSearchFilterTags = map[string]bool{ func (i *ImageService) SearchRegistryForImages(ctx context.Context, searchFilters filters.Args, term string, limit int, authConfig *registry.AuthConfig, headers map[string][]string) (*registry.SearchResults, error) { - if err := searchFilters.Validate(acceptedSearchFilterTags); err != nil { return nil, err } diff --git a/daemon/images/image_squash.go b/daemon/images/image_squash.go index 4560f5047c..71d7a6488e 100644 --- a/daemon/images/image_squash.go +++ b/daemon/images/image_squash.go @@ -15,7 +15,6 @@ import ( // The existing image(s) is not destroyed. // If no parent is specified, a new image with the diff of all the specified image's layers merged into a new layer that has no parents. func (i *ImageService) SquashImage(id, parent string) (string, error) { - var ( img *image.Image err error diff --git a/daemon/images/store.go b/daemon/images/store.go index 19122a4ca0..09776db24e 100644 --- a/daemon/images/store.go +++ b/daemon/images/store.go @@ -129,7 +129,6 @@ func (c *contentStoreForPull) Writer(ctx context.Context, opts ...content.Writer if err := o(&cfg); err != nil { return nil, err } - } c.addDigested(cfg.Desc.Digest) }