feat(report): display EOL information to scan summary (#1120)

* feat(report): display EOL information to scan summary

* detect Amazon linux EOL
This commit is contained in:
Kota Kanbe
2021-01-09 07:58:55 +09:00
committed by GitHub
parent 69d32d4511
commit 6eff6a9329
11 changed files with 648 additions and 108 deletions

View File

@@ -163,3 +163,17 @@ func Distinct(ss []string) (distincted []string) {
}
return
}
func Major(version string) string {
if version == "" {
return ""
}
ss := strings.SplitN(version, ":", 2)
ver := ""
if len(ss) == 1 {
ver = ss[0]
} else {
ver = ss[1]
}
return ver[0:strings.Index(ver, ".")]
}