github.com/quay/claircore@v1.5.28/photon/updaterset.go (about) 1 package photon 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/quay/claircore/libvuln/driver" 8 ) 9 10 var photonReleases = []Release{ 11 Photon1, 12 Photon2, 13 Photon3, 14 } 15 16 func UpdaterSet(_ context.Context) (driver.UpdaterSet, error) { 17 us := driver.NewUpdaterSet() 18 for _, release := range photonReleases { 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 }