// 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 }
func addCpeNames(table *uitable.Table, names []string) *uitable.Table { for _, n := range names { table.AddRow("CPE", fmt.Sprintf("%s", n)) } return table }
func addCpeNames(table *uitable.Table, names []models.CpeName) *uitable.Table { for _, p := range names { table.AddRow("CPE", fmt.Sprintf("%s", p.Name)) } return table }