Example #1
0
File: util.go Project: ymomoi/vuls
// addPackageInfos add package information related the CVE to table
func addPackageInfos(table *uitable.Table, packs []models.PackageInfo) *uitable.Table {
	for i, p := range packs {
		var title string
		if i == 0 {
			title = "Package"
		}
		ver := fmt.Sprintf(
			"%s -> %s", p.ToStringCurrentVersion(), p.ToStringNewVersion())
		table.AddRow(title, ver)
	}
	return table
}
Example #2
0
File: util.go Project: ymomoi/vuls
func addCpeNames(table *uitable.Table, names []string) *uitable.Table {
	for _, n := range names {
		table.AddRow("CPE", fmt.Sprintf("%s", n))
	}
	return table
}
Example #3
0
File: util.go Project: Rompei/vuls
func addCpeNames(table *uitable.Table, names []models.CpeName) *uitable.Table {
	for _, p := range names {
		table.AddRow("CPE", fmt.Sprintf("%s", p.Name))
	}
	return table
}