Use `net.JoinHostPort` for joining host and port.

v0.1
Martin Dosch 3 years ago
parent 3162fe366d
commit 62a185806d

@ -8,8 +8,10 @@ import (
"bufio" "bufio"
"crypto/tls" "crypto/tls"
"errors" "errors"
"fmt"
"io" "io"
"log" "log"
"net"
"os" "os"
"os/exec" "os/exec"
"os/user" "os/user"
@ -280,7 +282,7 @@ func main() {
password = config.password password = config.password
resource = config.resource resource = config.resource
if config.port != "" { if config.port != "" {
server = server + ":" + config.port server = net.JoinHostPort(server, fmt.Sprint(config.port))
} }
} }

Loading…
Cancel
Save