@@ -480,7 +480,7 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rp
480480 downloadCB .Start (u , tr ("Downloading index: %s" , u ))
481481 downloadCB .End (false , msg )
482482 failed = true
483- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
483+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
484484 continue
485485 }
486486
@@ -498,9 +498,9 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rp
498498 downloadCB .Start (u , tr ("Downloading index: %s" , filepath .Base (URL .Path )))
499499 downloadCB .End (false , msg )
500500 failed = true
501- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
501+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
502502 } else {
503- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_SKIPPED ))
503+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_SKIPPED ))
504504 }
505505 continue
506506 }
@@ -512,14 +512,14 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rp
512512 downloadCB .Start (u , tr ("Downloading index: %s" , filepath .Base (URL .Path )))
513513 downloadCB .End (false , tr ("Invalid index URL: %s" , err ))
514514 failed = true
515- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
515+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
516516 continue
517517 }
518518 indexFile := indexpath .Join (indexFileName )
519519 if info , err := indexFile .Stat (); err == nil {
520520 ageSecs := int64 (time .Since (info .ModTime ()).Seconds ())
521521 if ageSecs < req .GetUpdateIfOlderThanSecs () {
522- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_ALREADY_UP_TO_DATE ))
522+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_ALREADY_UP_TO_DATE ))
523523 continue
524524 }
525525 }
@@ -530,9 +530,9 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexRequest, downloadCB rp
530530 }
531531 if err := indexResource .Download (indexpath , downloadCB ); err != nil {
532532 failed = true
533- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
533+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_FAILED ))
534534 } else {
535- result .UpdatedIndexes = append (result .UpdatedIndexes , report (URL , rpc .IndexUpdateReport_STATUS_UPDATED ))
535+ result .UpdatedIndexes = append (result .GetUpdatedIndexes () , report (URL , rpc .IndexUpdateReport_STATUS_UPDATED ))
536536 }
537537 }
538538
0 commit comments