mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-01 23:18:41 +00:00
Prefer nil empty slices
Signed-off-by: David Gageot <david.gageot@docker.com>
This commit is contained in:
@@ -48,7 +48,7 @@ func ListCDROMs() []Provider {
|
||||
cdroms = append(cidevs, cdroms...)
|
||||
cdroms = uniqueString(cdroms)
|
||||
log.Debugf("unique devices to be checked: %v", cdroms)
|
||||
providers := []Provider{}
|
||||
var providers []Provider
|
||||
for _, device := range cdroms {
|
||||
providers = append(providers, NewCDROM(device))
|
||||
}
|
||||
@@ -65,7 +65,7 @@ func FindCIs() []string {
|
||||
// Glob can only error on invalid pattern
|
||||
panic(fmt.Sprintf("Invalid glob pattern: %s", blockDevs))
|
||||
}
|
||||
foundDevices := []string{}
|
||||
var foundDevices []string
|
||||
for _, device := range devs {
|
||||
// get the base device name
|
||||
dev := filepath.Base(device)
|
||||
|
Reference in New Issue
Block a user