Update the error handling for end-of-life-date parsing

This commit is contained in:
Aishwarya Thangappa 2020-01-06 22:57:54 -08:00
parent 9569d35d14
commit 9f24869e36
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,8 @@ func (s *StepPublishToSharedImageGallery) publishToSig(ctx context.Context, mdiI
if miSGImageVersionEndOfLifeDate != "" {
parseDate, err := date.ParseTime("2006-01-02T15:04:05.99Z", miSGImageVersionEndOfLifeDate)
if err != nil {
panic(err)
s.say(fmt.Sprintf("Error parsing date from shared_gallery_image_version_end_of_life_date: %s", err))
return "", err
}
endOfLifeDate = &date.Time{Time: parseDate}
} else {