Fix errors in example code

This commit is contained in:
Julien Laffaye 2019-04-15 18:34:29 +02:00
parent 52d3001130
commit 75b9ebed79

View File

@ -16,19 +16,19 @@ go get -u github.com/jlaffaye/ftp
## Example ## ## Example ##
```go ```go
c, err := ftp.DialWithOptions("ftp.example.org", DialWithTimeout(5*time.Second)) c, err := ftp.DialWithOptions("ftp.example.org:21", ftp.DialWithTimeout(5*time.Second))
if err != nil { if err != nil {
t.Fatal(err) log.Fatal(err)
} }
err = c.Login("anonymous", "anonymous") err = c.Login("anonymous", "anonymous")
if err != nil { if err != nil {
t.Fatal(err) log.Fatal(err)
} }
// Do something with the FTP conn // Do something with the FTP conn
if err := c.Close(); err != nil { if err := c.Quit(); err != nil {
t.Fatal(err) log.Fatal(err)
} }
``` ```