Prefer nil empty slices

Signed-off-by: David Gageot <david.gageot@docker.com>
This commit is contained in:
David Gageot
2022-10-07 20:40:04 +02:00
parent ebb5ded10b
commit 810c3e788f
4 changed files with 6 additions and 6 deletions

View File

@@ -197,7 +197,7 @@ func makeDevLinks() error {
// return a list of all available drives
func findDrives() []string {
driveKeys := []string{}
var driveKeys []string
ignoreExp := regexp.MustCompile(`^loop.*$|^nbd.*$|^[a-z]+[0-9]+$`)
devs, _ := ioutil.ReadDir("/dev")
for _, d := range devs {