mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-07-16 08:04:43 +00:00
bugfixes nov2025 (#3)
* Fix enter misbehaving. * Cleanup after previous tui implementation. * Fix race condition and improve logging * Add filtering of the namespaces by text input in the wizard UI
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
@@ -305,17 +304,3 @@ func CheckPortAvailability(port int) (bool, string, error) {
|
||||
listener.Close()
|
||||
return true, "", nil
|
||||
}
|
||||
|
||||
// ValidatePort checks if a port number is valid.
|
||||
func ValidatePort(portStr string) (int, error) {
|
||||
port, err := strconv.Atoi(portStr)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("invalid port number: %s", portStr)
|
||||
}
|
||||
|
||||
if port < 1 || port > 65535 {
|
||||
return 0, fmt.Errorf("port must be between 1 and 65535, got %d", port)
|
||||
}
|
||||
|
||||
return port, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user