mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Use functional options to construct driver root
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -93,8 +93,11 @@ func New(opts ...Option) (Interface, error) {
|
||||
l.infolib = info.New()
|
||||
}
|
||||
|
||||
// TODO: We need to improve the construction of this driver root.
|
||||
l.driver = root.New(l.logger, l.driverRoot, l.librarySearchPaths)
|
||||
l.driver = root.New(
|
||||
root.WithLogger(l.logger),
|
||||
root.WithDriverRoot(l.driverRoot),
|
||||
root.WithLibrarySearchPaths(l.librarySearchPaths...),
|
||||
)
|
||||
|
||||
var lib Interface
|
||||
switch l.resolveMode() {
|
||||
|
||||
Reference in New Issue
Block a user