Browse code

daemon/graphdriver: rename vars that shadowed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2025/02/19 20:27:15
Showing 1 changed files
... ...
@@ -166,14 +166,14 @@ type Options struct {
166 166
 // if scanning prior drivers is ambiguous (i.e., if state is found for
167 167
 // multiple drivers), or if no compatible driver is available for the
168 168
 // platform and underlying filesystem.
169
-func New(name string, config Options) (Driver, error) {
169
+func New(driverName string, config Options) (Driver, error) {
170 170
 	ctx := context.TODO()
171
-	if name != "" {
172
-		log.G(ctx).Infof("[graphdriver] trying configured driver: %s", name)
173
-		if err := checkRemoved(name); err != nil {
171
+	if driverName != "" {
172
+		log.G(ctx).Infof("[graphdriver] trying configured driver: %s", driverName)
173
+		if err := checkRemoved(driverName); err != nil {
174 174
 			return nil, err
175 175
 		}
176
-		return getDriver(name, config)
176
+		return getDriver(driverName, config)
177 177
 	}
178 178
 
179 179
 	// Guess for prior driver
... ...
@@ -200,8 +200,8 @@ func New(name string, config Options) (Driver, error) {
200 200
 			// to ensure the user explicitly selects the driver to load
201 201
 			if len(driversMap) > 1 {
202 202
 				var driversSlice []string
203
-				for name := range driversMap {
204
-					driversSlice = append(driversSlice, name)
203
+				for d := range driversMap {
204
+					driversSlice = append(driversSlice, d)
205 205
 				}
206 206
 
207 207
 				err = errors.Errorf("%s contains several valid graphdrivers: %s; cleanup or explicitly choose storage driver (-s <DRIVER>)", config.Root, strings.Join(driversSlice, ", "))