github.com/quay/claircore@v1.5.28/aws/updaterset.go (about) 1 package aws 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/quay/claircore/libvuln/driver" 8 ) 9 10 var amazonReleases = []Release{ 11 AmazonLinux1, 12 AmazonLinux2, 13 AmazonLinux2023, 14 } 15 16 func UpdaterSet(_ context.Context) (driver.UpdaterSet, error) { 17 us := driver.NewUpdaterSet() 18 for _, release := range amazonReleases { 19 u, err := NewUpdater(release) 20 if err != nil { 21 return us, fmt.Errorf("failed to create updater: %v", err) 22 } 23 err = us.Add(u) 24 if err != nil { 25 return us, err 26 } 27 } 28 return us, nil 29 }