Tidy up
All checks were successful
Go Test / test (push) Successful in 1m43s

This commit is contained in:
Fred Boniface 2024-04-06 22:31:38 +01:00
parent a15cbb778a
commit 3481c4e314
2 changed files with 5 additions and 3 deletions

View File

@ -71,7 +71,8 @@ func doCreations(creations []*upstreamApi.JsonScheduleV1) error {
createDocuments := make([]database.Service, 0)
for _, item := range creations {
document := database.Service{}
// Do type conversion here
// Do type conversion here - REMOVE THIS LOG LINE, IT WILL CAUSE 10000s of log entries
log.Msg.Debug("item", zap.Any("item", item))
createDocuments = append(createDocuments, document)
}

View File

@ -60,7 +60,7 @@ func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMeta
return err
}
// Parse CIF file
parsed, err = parseCifData(data)
parsed, err := parseCifData(data)
if err != nil {
log.Msg.Error("Error parsing CIF data", zap.Error(err))
return err
@ -70,7 +70,8 @@ func runCifUpdateDownload(cfg *helpers.Configuration, metadata *dbAccess.CifMeta
//// I need to check what the sequence looks like in a full download first.
//// Regarding metadata, I will need to replace 'metadata *dbAccess.CifMetadata' with the new metadata to ensure it is checked correctly in each iteration.
// Process CIF file
// Update metadata variable
metadata = generateMetadata(&parsed.header)
}
// Write metadata