0
0
forked from toolshed/abra

chore: bump deps

This commit is contained in:
2025-08-12 07:04:57 +02:00
committed by decentral1se
parent 157d131b37
commit 56a68dfa91
981 changed files with 36486 additions and 39650 deletions

View File

@ -1,7 +1,7 @@
package nat
import (
"fmt"
"errors"
"strconv"
"strings"
)
@ -9,7 +9,7 @@ import (
// ParsePortRange parses and validates the specified string as a port-range (8000-9000)
func ParsePortRange(ports string) (uint64, uint64, error) {
if ports == "" {
return 0, 0, fmt.Errorf("empty string specified for ports")
return 0, 0, errors.New("empty string specified for ports")
}
if !strings.Contains(ports, "-") {
start, err := strconv.ParseUint(ports, 10, 16)
@ -27,7 +27,7 @@ func ParsePortRange(ports string) (uint64, uint64, error) {
return 0, 0, err
}
if end < start {
return 0, 0, fmt.Errorf("invalid range specified for port: %s", ports)
return 0, 0, errors.New("invalid range specified for port: " + ports)
}
return start, end, nil
}