From 16e7d30ffdc43a9263b3634bfc878b92cc9e7d60 Mon Sep 17 00:00:00 2001 From: delarea Date: Mon, 18 Sep 2023 13:53:31 +0300 Subject: [PATCH] fix static check --- xray/commands/scan/dockerscan.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xray/commands/scan/dockerscan.go b/xray/commands/scan/dockerscan.go index 6f74430b1..24bc35195 100644 --- a/xray/commands/scan/dockerscan.go +++ b/xray/commands/scan/dockerscan.go @@ -36,7 +36,6 @@ type DockerScanCommand struct { dockerFilePath string scanner *bufio.Scanner hashToCommandMap map[string]services.DockerfileCommandDetails - commandsMap map[string]string } func NewDockerScanCommand() *DockerScanCommand { @@ -147,7 +146,7 @@ func (dsc *DockerScanCommand) buildDockerImage() (err error) { return fmt.Errorf("didn't find Dockerfile in the provided path: %s", dsc.dockerFilePath) } if dsc.progress != nil { - dsc.progress.SetHeadlineMsg(fmt.Sprintf("Building Docker image 🏗️")) + dsc.progress.SetHeadlineMsg("Building Docker image 🏗....️") } dsc.imageTag = "audittag" // TODO this could take a while, need to update progress bar. @@ -289,8 +288,8 @@ func (dsc *DockerScanCommand) mapDockerfileCommands(dockerCommandsMap map[string } // Assign all the unassigned commands to the FROM command before moving on. if strings.Contains(scannedCommand, fromCommand) { - if firstAppearanceFrom == false { - for key, _ := range dockerCommandsMap { + if !firstAppearanceFrom { + for key := range dockerCommandsMap { current := dockerCommandsMap[key] if len(current.Line) == 0 { current.Line = append(current.Line, strconv.Itoa(fromLineNumber))