mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Fixed spelling of interims.csv
This commit is contained in:
parent
892a0b941b
commit
6547ed0a4b
2 changed files with 22 additions and 7 deletions
|
|
@ -24,6 +24,21 @@ import (
|
|||
"github.com/csaf-poc/csaf_distribution/util"
|
||||
)
|
||||
|
||||
const (
|
||||
// interimsCSV is the name of the file to store the URLs
|
||||
// of the interim advisories.
|
||||
interimsCSV = "interims.csv"
|
||||
|
||||
// changesCSV is the name of the file to store the
|
||||
// the paths to the advisories sorted in descending order
|
||||
// of the release date along with the release date.
|
||||
changesCSV = "changes.csv"
|
||||
|
||||
// indexTXT is the name of the file to store the
|
||||
// the paths of the advisories.
|
||||
indexTXT = "index.txt"
|
||||
)
|
||||
|
||||
func (w *worker) writeInterims(label string, summaries []summary) error {
|
||||
|
||||
// Filter out the interims.
|
||||
|
|
@ -44,7 +59,7 @@ func (w *worker) writeInterims(label string, summaries []summary) error {
|
|||
ss[j].summary.CurrentReleaseDate)
|
||||
})
|
||||
|
||||
fname := filepath.Join(w.dir, label, "interim.csv")
|
||||
fname := filepath.Join(w.dir, label, interimsCSV)
|
||||
f, err := os.Create(fname)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -85,7 +100,7 @@ func (w *worker) writeCSV(label string, summaries []summary) error {
|
|||
ss[j].summary.CurrentReleaseDate)
|
||||
})
|
||||
|
||||
fname := filepath.Join(w.dir, label, "changes.csv")
|
||||
fname := filepath.Join(w.dir, label, changesCSV)
|
||||
f, err := os.Create(fname)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -121,7 +136,7 @@ func (w *worker) writeCSV(label string, summaries []summary) error {
|
|||
|
||||
func (w *worker) writeIndex(label string, summaries []summary) error {
|
||||
|
||||
fname := filepath.Join(w.dir, label, "index.txt")
|
||||
fname := filepath.Join(w.dir, label, indexTXT)
|
||||
f, err := os.Create(fname)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -176,9 +176,9 @@ func (w *worker) interimWork(wg *sync.WaitGroup, jobs <-chan *interimJob) {
|
|||
label = strings.ToLower(label)
|
||||
labelPath := filepath.Join(providerPath, label)
|
||||
|
||||
interimsCSV := filepath.Join(labelPath, "interims.csv")
|
||||
interCSV := filepath.Join(labelPath, interimsCSV)
|
||||
interims, err := readInterims(
|
||||
interimsCSV, w.processor.cfg.InterimYears)
|
||||
interCSV, w.processor.cfg.InterimYears)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -200,8 +200,8 @@ func (w *worker) interimWork(wg *sync.WaitGroup, jobs <-chan *interimJob) {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
interimsCSV := filepath.Join(dst, label, "interims.csv")
|
||||
if err := writeInterims(interimsCSV, finalized); err != nil {
|
||||
interCSV := filepath.Join(dst, label, interimsCSV)
|
||||
if err := writeInterims(interCSV, finalized); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue