Rename discover.NewList to discover.Merge

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-07-05 10:28:40 +02:00
parent 89824849d3
commit 9191074666
3 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ func NewGDSDiscoverer(logger *logrus.Logger, root string) (Discover, error) {
d := gdsDeviceDiscoverer{
logger: logger,
devices: devices,
mounts: NewList(udev, cufile),
mounts: Merge(udev, cufile),
}
return &d, nil

View File

@ -27,8 +27,8 @@ type list struct {
var _ Discover = (*list)(nil)
// NewList creates a discoverer that is the composite of a list of discoveres.
func NewList(d ...Discover) Discover {
// Merge creates a discoverer that is the composite of a list of discoveres.
func Merge(d ...Discover) Discover {
l := list{
discoverers: d,
}

View File

@ -94,7 +94,7 @@ func NewCSVModifier(logger *logrus.Logger, cfg *config.Config, ociSpec oci.Spec)
return nil, fmt.Errorf("failed to create symlink hook discoverer: %v", err)
}
d := discover.NewList(csvDiscoverer, ldcacheUpdateHook, createSymlinksHook)
d := discover.Merge(csvDiscoverer, ldcacheUpdateHook, createSymlinksHook)
discoverModifier, err := NewModifierFromDiscoverer(logger, d)
if err != nil {