From 84334439b61b6f90ba683540611aea2cedefc31d Mon Sep 17 00:00:00 2001 From: Logan Freijo <5163050+lfreijo@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:15:46 -0400 Subject: [PATCH] replaced fmt.Sprintf with net.JoinHostPort --- ftp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftp.go b/ftp.go index a41deef..7014dba 100644 --- a/ftp.go +++ b/ftp.go @@ -161,7 +161,7 @@ func Dial(addr string, options ...DialOption) (*ServerConn, error) { return nil, err } - tconn, err := dialFunc("tcp", fmt.Sprintf("%s:%s", addrs[0].IP.String(), port)) + tconn, err := dialFunc("tcp", net.JoinHostPort(addrs[0].IP.String(), port)) if err != nil { return nil, err }