Refactoring

This commit is contained in:
Kota Kanbe
2017-05-21 11:45:21 +09:00
committed by kota kanbe
parent 9128e2748b
commit d9bc4499a4
23 changed files with 2086 additions and 1885 deletions

View File

@@ -23,7 +23,6 @@ import (
"strings"
"github.com/future-architect/vuls/config"
"github.com/future-architect/vuls/models"
)
// GenWorkers generates goroutine
@@ -139,18 +138,18 @@ func Truncate(str string, length int) string {
// 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
}
// 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 ""
}
// return ""
// }