Sort by names, then IPs

This commit is contained in:
Ian Gulliver
2026-01-28 21:16:35 -08:00
parent 522b64450b
commit 7f36444003
3 changed files with 18 additions and 3 deletions

View File

@@ -266,5 +266,14 @@ func (n *Node) FirstMAC() string {
return string(iface.MAC)
}
}
return "??"
return ""
}
func (n *Node) FirstIP() string {
for _, iface := range n.Interfaces {
for ip := range iface.IPs {
return ip
}
}
return ""
}