From 4d1d644cf19d7547d270aab65c7570db1ccf2279 Mon Sep 17 00:00:00 2001 From: Julien Laffaye Date: Thu, 18 Aug 2022 12:44:22 -0400 Subject: [PATCH] Mark Connect() and DialWithTimeout() as deprecated --- ftp.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ftp.go b/ftp.go index 1b5e1a5..9ba5651 100644 --- a/ftp.go +++ b/ftp.go @@ -308,14 +308,15 @@ func (o *dialOptions) wrapStream(rd io.ReadCloser) io.ReadCloser { } // Connect is an alias to Dial, for backward compatibility +// +// Deprecated: Use [Dial] instead func Connect(addr string) (*ServerConn, error) { return Dial(addr) } // DialTimeout initializes the connection to the specified ftp server address. // -// It is generally followed by a call to Login() as most FTP commands require -// an authenticated user. +// Deprecated: Use [Dial] with [DialWithTimeout] option instead func DialTimeout(addr string, timeout time.Duration) (*ServerConn, error) { return Dial(addr, DialWithTimeout(timeout)) }