Make 'system_update' more generic

This commit is contained in:
Tom Wiesing 2022-09-19 14:56:28 +02:00
parent f7b8804c61
commit 881b538dff
No known key found for this signature in database
19 changed files with 250 additions and 222 deletions

View file

@ -88,6 +88,11 @@ func (dis *Distillery) Installables() []component.Installable {
return getComponents[component.Installable](dis)
}
// Installables returns all components that can be installed
func (dis *Distillery) Updateable() []component.Updatable {
return getComponents[component.Updatable](dis)
}
func getComponents[C component.Component](dis *Distillery) (result []C) {
all := dis.ComponentsX()