Add gocritic to linters

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
Ulysses Souza
2022-07-13 01:00:36 +02:00
parent 923e01d151
commit 2e96829607
8 changed files with 55 additions and 50 deletions

View File

@@ -46,13 +46,16 @@ var (
// DockerScanExecutableName is the OS dependent Docker CLI binary name
DockerScanExecutableName = "docker-scan"
// WindowsExecutableSuffix is the Windows executable suffix
WindowsExecutableSuffix = ".exe"
)
func init() {
if runtime.GOOS == "windows" {
DockerExecutableName = DockerExecutableName + ".exe"
DockerComposeExecutableName = DockerComposeExecutableName + ".exe"
DockerScanExecutableName = DockerScanExecutableName + ".exe"
DockerExecutableName += WindowsExecutableSuffix
DockerComposeExecutableName += WindowsExecutableSuffix
DockerScanExecutableName += WindowsExecutableSuffix
}
}