platform: Uniq network interfaces
This commit is contained in:
1 file changed
+3
@@ -126,6 +126,9 @@ func (w *platformInterfaceWrapper) NetworkInterfaces() ([]adapter.NetworkInterfa
|
|||||||
Constrained: isDefault && w.isConstrained,
|
Constrained: isDefault && w.isConstrained,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
interfaces = common.UniqBy(interfaces, func(it adapter.NetworkInterface) string {
|
||||||
|
return it.Name
|
||||||
|
})
|
||||||
return interfaces, nil
|
return interfaces, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user