From 62556c464c68838949ea60f601a06b7ee15192d8 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Thu, 7 May 2020 11:39:09 +0200 Subject: [PATCH] Update builder/docker/artifact_import.go --- builder/docker/artifact_import.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/builder/docker/artifact_import.go b/builder/docker/artifact_import.go index 1849f7621..c626a9df3 100644 --- a/builder/docker/artifact_import.go +++ b/builder/docker/artifact_import.go @@ -33,17 +33,16 @@ func (a *ImportArtifact) String() string { tags := a.StateData["docker_tags"] if tags == nil { return fmt.Sprintf("Imported Docker image: %s", a.Id()) - } else { - cast := tags.([]interface{}) - names := []string{} - for _, name := range cast { - if n, ok := name.(string); ok { - names = append(names, n) - } + } + cast := tags.([]interface{}) + names := []string{} + for _, name := range cast { + if n, ok := name.(string); ok { + names = append(names, n) } - return fmt.Sprintf("Imported Docker image: %s with tags %s", - a.Id(), strings.Join(names, " ")) } + return fmt.Sprintf("Imported Docker image: %s with tags %s", + a.Id(), strings.Join(names, " ")) } func (a *ImportArtifact) State(name string) interface{} {