gofmt ftp.go

This commit is contained in:
Julien Laffaye 2013-09-07 18:48:40 +02:00
parent 816272713b
commit 1b161dcaad

8
ftp.go
View File

@ -153,7 +153,7 @@ func (c *ServerConn) epsv() (port int, err error) {
return
}
// pasv issues an "PASV" command to get a port number for a data connection.
// pasv issues a "PASV" command to get a port number for a data connection.
func (c *ServerConn) pasv() (port int, err error) {
_, line, err := c.cmd(StatusPassiveMode, "PASV")
if err != nil {
@ -198,8 +198,8 @@ func (c *ServerConn) openDataConn() (net.Conn, error) {
// If features contains nat6 or EPSV => EPSV
// else -> PASV
_,nat6Supported := c.features["nat6"];
_,epsvSupported := c.features["EPSV"];
_, nat6Supported := c.features["nat6"]
_, epsvSupported := c.features["EPSV"]
if nat6Supported || epsvSupported {
port, err = c.epsv()
if err != nil {
@ -212,7 +212,6 @@ func (c *ServerConn) openDataConn() (net.Conn, error) {
}
}
// Build the new net address string
addr := fmt.Sprintf("%s:%d", c.host, port)
@ -467,4 +466,3 @@ func (r *response) Close() error {
}
return err
}