os minor should default to 0 (#513)

This commit is contained in:
Salah Aldeen Al Saleh
2021-12-10 13:17:36 -08:00
committed by GitHub
parent 347d462d7f
commit 4c72573936

View File

@@ -123,7 +123,7 @@ func getSystemPackageTemplateMap(pkg collect.SystemPackage, osName string, osVer
osVersionParts := strings.Split(osVersion, ".")
osVersionMajor, _ := strconv.ParseInt(osVersionParts[0], 10, 64)
var osVersionMinor int64 = -1
var osVersionMinor int64
if len(osVersionParts) > 1 {
osVersionMinor, _ = strconv.ParseInt(osVersionParts[1], 10, 64)
}