mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-09 02:41:49 +00:00
Prefer nil empty slices
Signed-off-by: David Gageot <david.gageot@docker.com>
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user