Skip to content

Commit 3cea973

Browse files
committed
incusd: Fix function shadowing
Signed-off-by: Stéphane Graber <[email protected]>
1 parent a56f59c commit 3cea973

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/server/device/config/devices.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ type Device map[string]string
1313

1414
// Clone returns a copy of the Device.
1515
func (device Device) Clone() Device {
16-
copy := make(map[string]string, len(device))
16+
devCopy := make(map[string]string, len(device))
1717

1818
for k, v := range device {
19-
copy[k] = v
19+
devCopy[k] = v
2020
}
2121

22-
return copy
22+
return devCopy
2323
}
2424

2525
// Validate accepts a map of field/validation functions to run against the device's config.

internal/server/util/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ func CompareConfigs(config1, config2 map[string]string, exclude []string) error
5252

5353
// CopyConfig creates a new map with a copy of the given config.
5454
func CopyConfig(config map[string]string) map[string]string {
55-
copy := make(map[string]string, len(config))
55+
confCopy := make(map[string]string, len(config))
5656
for key, value := range config {
57-
copy[key] = value
57+
confCopy[key] = value
5858
}
5959

60-
return copy
60+
return confCopy
6161
}

0 commit comments

Comments
 (0)