Implement -format-full-text

This commit is contained in:
Kota Kanbe
2017-05-17 10:18:13 +09:00
committed by kota kanbe
parent 3be11cf52f
commit 4fcdea3ccb
3 changed files with 181 additions and 120 deletions

View File

@@ -23,6 +23,7 @@ import (
"strings"
"github.com/future-architect/vuls/config"
"github.com/future-architect/vuls/models"
)
// GenWorkers generates goroutine
@@ -135,3 +136,21 @@ func Truncate(str string, length int) string {
}
return str
}
// VendorLink returns a URL of the given OS family and CVEID
//TODO
func VendorLink(family, cveID string) string {
cType := models.NewCveContentType(family)
switch cType {
case models.RedHat:
return "https://access.redhat.com/security/cve/" + cveID
case models.Debian:
return "https://security-tracker.debian.org/tracker/" + cveID
case models.Ubuntu:
return "http://people.ubuntu.com/~ubuntu-security/cve/" + cveID
// case models.FreeBSD:
// return "http://people.ubuntu.com/~ubuntu-security/cve/" + cveID
}
return ""
}