replaced fmt.Sprintf with net.JoinHostPort
This commit is contained in:
parent
acf978cd45
commit
84334439b6
2
ftp.go
2
ftp.go
@ -161,7 +161,7 @@ func Dial(addr string, options ...DialOption) (*ServerConn, error) {
|
|||||||
return nil, err
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user