fix(cli): fix incorrect comparision of DB metadata type. (#1286)

-- Incorrect Db metadata type comparision resulted in wrong
print in show version.

This fixes #1275.

Signed-off-by: Bes Dollma <besi7dollma@gmail.com>
This commit is contained in:
besdollma
2021-10-08 19:16:46 +03:00
committed by GitHub
parent 0dec17fc3f
commit cc344dfbe3
2 changed files with 3 additions and 3 deletions

View File

@@ -410,9 +410,9 @@ func showVersion(cacheDir, outputFormat, version string, outputWriter io.Writer)
if dbMeta != nil {
var dbType string
switch dbMeta.Type {
case 0:
case db.TypeFull:
dbType = "Full"
case 1:
case db.TypeLight:
dbType = "Light"
}
output += fmt.Sprintf(`Vulnerability DB: