LAN-Orangutan is a self-hosted network discovery tool. Find every device on your LAN, label and group them, snapshot your network and compare it later, and get flagged when something unexpected shows up. Single binary, no setup, Tailscale built in. Built by 291 Group.
Go clidevice-discoverygolanghomelabinternet-of-thingslannetwork-discoverynetwork-monitoringnetwork-monitoring-toolnetwork-scannernetworkingnmapsecurityself-hostedselfhostedtailscaletailscale-networkweb-dashboard
package web
import (
"strings"
"testing"
)
func TestTypeIcon(t *testing.T) {
// Every type the classifier can produce should have an icon.
for _, dt := range []string{"Phone", "Computer", "Printer", "TV", "Media Player", "Router", "Server", "IoT", "Game Console"} {
html := string(typeIcon(dt))
if !strings.Contains(html, "<svg") {
t.Errorf("type %q has no icon", dt)
}
}
// An unknown type yields no icon, not broken markup.
if got := typeIcon("Nonsense"); got != "" {
t.Errorf("unknown type should yield empty, got %q", got)
}
if got := typeIcon(""); got != "" {
t.Errorf("empty type should yield empty, got %q", got)
}
}