mirror of
				https://github.com/NVIDIA/nvidia-container-toolkit
				synced 2025-06-26 18:18:24 +00:00 
			
		
		
		
	Remove 'Executable' from private struct member names
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
		
							parent
							
								
									09d42f0ad9
								
							
						
					
					
						commit
						ebbc47702d
					
				| @ -97,7 +97,7 @@ type drmDevicesByPath struct { | ||||
| 	None | ||||
| 	logger        *logrus.Logger | ||||
| 	lookup        lookup.Locator | ||||
| 	nvidiaCTKExecutablePath string | ||||
| 	nvidiaCTKPath string | ||||
| 	root          string | ||||
| 	devicesFrom   Discover | ||||
| } | ||||
| @ -107,7 +107,7 @@ func newCreateDRMByPathSymlinks(logger *logrus.Logger, devices Discover, cfg *Co | ||||
| 	d := drmDevicesByPath{ | ||||
| 		logger:        logger, | ||||
| 		lookup:        lookup.NewExecutableLocator(logger, cfg.Root), | ||||
| 		nvidiaCTKExecutablePath: cfg.NvidiaCTKPath, | ||||
| 		nvidiaCTKPath: cfg.NvidiaCTKPath, | ||||
| 		root:          cfg.Root, | ||||
| 		devicesFrom:   devices, | ||||
| 	} | ||||
| @ -133,13 +133,13 @@ func (d drmDevicesByPath) Hooks() ([]Hook, error) { | ||||
| 	} | ||||
| 
 | ||||
| 	hookPath := nvidiaCTKDefaultFilePath | ||||
| 	targets, err := d.lookup.Locate(d.nvidiaCTKExecutablePath) | ||||
| 	targets, err := d.lookup.Locate(d.nvidiaCTKPath) | ||||
| 	if err != nil { | ||||
| 		d.logger.Warnf("Failed to locate %v: %v", d.nvidiaCTKExecutablePath, err) | ||||
| 		d.logger.Warnf("Failed to locate %v: %v", d.nvidiaCTKPath, err) | ||||
| 	} else if len(targets) == 0 { | ||||
| 		d.logger.Warnf("%v not found", d.nvidiaCTKExecutablePath) | ||||
| 		d.logger.Warnf("%v not found", d.nvidiaCTKPath) | ||||
| 	} else { | ||||
| 		d.logger.Debugf("Found %v candidates: %v", d.nvidiaCTKExecutablePath, targets) | ||||
| 		d.logger.Debugf("Found %v candidates: %v", d.nvidiaCTKPath, targets) | ||||
| 		hookPath = targets[0] | ||||
| 	} | ||||
| 	d.logger.Debugf("Using NVIDIA Container Toolkit CLI path %v", hookPath) | ||||
|  | ||||
| @ -32,7 +32,7 @@ func NewLDCacheUpdateHook(logger *logrus.Logger, mounts Discover, cfg *Config) ( | ||||
| 		logger:        logger, | ||||
| 		mountsFrom:    mounts, | ||||
| 		lookup:        lookup.NewExecutableLocator(logger, cfg.Root), | ||||
| 		nvidiaCTKExecutablePath: cfg.NvidiaCTKPath, | ||||
| 		nvidiaCTKPath: cfg.NvidiaCTKPath, | ||||
| 	} | ||||
| 
 | ||||
| 	return &d, nil | ||||
| @ -47,7 +47,7 @@ type ldconfig struct { | ||||
| 	logger        *logrus.Logger | ||||
| 	mountsFrom    Discover | ||||
| 	lookup        lookup.Locator | ||||
| 	nvidiaCTKExecutablePath string | ||||
| 	nvidiaCTKPath string | ||||
| } | ||||
| 
 | ||||
| // Hooks checks the required mounts for libraries and returns a hook to update the LDcache for the discovered paths.
 | ||||
| @ -57,7 +57,7 @@ func (d ldconfig) Hooks() ([]Hook, error) { | ||||
| 		return nil, fmt.Errorf("failed to discover mounts for ldcache update: %v", err) | ||||
| 	} | ||||
| 	h := CreateLDCacheUpdateHook( | ||||
| 		d.nvidiaCTKExecutablePath, | ||||
| 		d.nvidiaCTKPath, | ||||
| 		getLibraryPaths(mounts), | ||||
| 	) | ||||
| 	return []Hook{h}, nil | ||||
|  | ||||
| @ -30,7 +30,7 @@ type symlinks struct { | ||||
| 	None | ||||
| 	logger        *logrus.Logger | ||||
| 	lookup        lookup.Locator | ||||
| 	nvidiaCTKExecutablePath string | ||||
| 	nvidiaCTKPath string | ||||
| 	csvFiles      []string | ||||
| 	mountsFrom    Discover | ||||
| } | ||||
| @ -40,7 +40,7 @@ func NewCreateSymlinksHook(logger *logrus.Logger, csvFiles []string, mounts Disc | ||||
| 	d := symlinks{ | ||||
| 		logger:        logger, | ||||
| 		lookup:        lookup.NewExecutableLocator(logger, cfg.Root), | ||||
| 		nvidiaCTKExecutablePath: cfg.NvidiaCTKPath, | ||||
| 		nvidiaCTKPath: cfg.NvidiaCTKPath, | ||||
| 		csvFiles:      csvFiles, | ||||
| 		mountsFrom:    mounts, | ||||
| 	} | ||||
| @ -51,13 +51,13 @@ func NewCreateSymlinksHook(logger *logrus.Logger, csvFiles []string, mounts Disc | ||||
| // Hooks returns a hook to create the symlinks from the required CSV files
 | ||||
| func (d symlinks) Hooks() ([]Hook, error) { | ||||
| 	hookPath := nvidiaCTKDefaultFilePath | ||||
| 	targets, err := d.lookup.Locate(d.nvidiaCTKExecutablePath) | ||||
| 	targets, err := d.lookup.Locate(d.nvidiaCTKPath) | ||||
| 	if err != nil { | ||||
| 		d.logger.Warnf("Failed to locate %v: %v", d.nvidiaCTKExecutablePath, err) | ||||
| 		d.logger.Warnf("Failed to locate %v: %v", d.nvidiaCTKPath, err) | ||||
| 	} else if len(targets) == 0 { | ||||
| 		d.logger.Warnf("%v not found", d.nvidiaCTKExecutablePath) | ||||
| 		d.logger.Warnf("%v not found", d.nvidiaCTKPath) | ||||
| 	} else { | ||||
| 		d.logger.Debugf("Found %v candidates: %v", d.nvidiaCTKExecutablePath, targets) | ||||
| 		d.logger.Debugf("Found %v candidates: %v", d.nvidiaCTKPath, targets) | ||||
| 		hookPath = targets[0] | ||||
| 	} | ||||
| 	d.logger.Debugf("Using NVIDIA Container Toolkit CLI path %v", hookPath) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user