Show better debug message

This commit is contained in:
pufferffish 2024-04-13 02:28:52 +01:00
parent 728438cc33
commit 1e0391c281

View file

@ -106,12 +106,12 @@ func lock(stage string) {
func extractPort(addr string) uint16 { func extractPort(addr string) uint16 {
_, portStr, err := net.SplitHostPort(addr) _, portStr, err := net.SplitHostPort(addr)
if err != nil { if err != nil {
panic(err) panic(fmt.Errorf("failed to extract port from %s: %w", addr, err))
} }
port, err := strconv.Atoi(portStr) port, err := strconv.Atoi(portStr)
if err != nil { if err != nil {
panic(err) panic(fmt.Errorf("failed to extract port from %s: %w", addr, err))
} }
return uint16(port) return uint16(port)