feat: cmd status show remote-kubeconfig name (#695)

* feat: cmd status show remote-kubeconfig name
This commit is contained in:
naison
2025-08-10 14:23:01 +08:00
committed by GitHub
parent d2a6d78331
commit d40e69e781
15 changed files with 238 additions and 113 deletions

21
pkg/ssh/name_test.go Normal file
View File

@@ -0,0 +1,21 @@
package ssh
import (
"testing"
)
func TestName(t *testing.T) {
testIPs := []string{
"192.168.1.1",
"2001:0db8:85a3:0000:0000:8a2e:0370:7334",
"::1",
"fe80::1%eth0",
"203.0.113.0",
"invalid-ip",
"::ffff:192.168.1.1",
}
for _, ip := range testIPs {
t.Logf("%-35s => %s", ip, IPToFilename(ip))
}
}