From 9191074666b64d5ecb6e73a7fa8097896a5ccffa Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 5 Jul 2022 10:28:40 +0200 Subject: [PATCH] Rename discover.NewList to discover.Merge Signed-off-by: Evan Lezar --- internal/discover/gds.go | 2 +- internal/discover/list.go | 4 ++-- internal/modifier/csv.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/discover/gds.go b/internal/discover/gds.go index 520b6e2e..f771aed7 100644 --- a/internal/discover/gds.go +++ b/internal/discover/gds.go @@ -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 diff --git a/internal/discover/list.go b/internal/discover/list.go index a30cf0fc..aa0c5910 100644 --- a/internal/discover/list.go +++ b/internal/discover/list.go @@ -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, } diff --git a/internal/modifier/csv.go b/internal/modifier/csv.go index 76c34e84..4c5348b7 100644 --- a/internal/modifier/csv.go +++ b/internal/modifier/csv.go @@ -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 {