Added Logout() method.
This commit is contained in:
parent
e00e1f11a0
commit
91fc6ada34
@ -91,6 +91,11 @@ func TestConn(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
err = c.Logout()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
c.Quit()
|
||||
|
||||
err = c.NoOp()
|
||||
|
6
ftp.go
6
ftp.go
@ -327,6 +327,12 @@ func (c *ServerConn) NoOp() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Logout issues a REIN FTP command to logout the current user.
|
||||
func (c *ServerConn) Logout() error {
|
||||
_, _, err := c.cmd(StatusLoggedIn, "REIN")
|
||||
return err
|
||||
}
|
||||
|
||||
// Quit issues a QUIT FTP command to properly close the connection from the
|
||||
// remote FTP server.
|
||||
func (c *ServerConn) Quit() error {
|
||||
|
Loading…
Reference in New Issue
Block a user