feat: add address and port resolution options

This commit is contained in:
Karol Broda
2025-12-23 16:24:29 +01:00
parent c95a5ebd23
commit c58f2a233d
10 changed files with 324 additions and 54 deletions

View File

@@ -1,7 +1,6 @@
package tui
import (
"fmt"
"regexp"
"github.com/karol-broda/snitch/internal/collector"
"strings"
@@ -44,10 +43,3 @@ func sortFieldLabel(f collector.SortField) string {
}
}
func formatRemote(addr string, port int) string {
if addr == "" || addr == "*" || port == 0 {
return "-"
}
return fmt.Sprintf("%s:%d", addr, port)
}