From 7b85eb4638a2c0473acefcfb929a98f879c15c86 Mon Sep 17 00:00:00 2001 From: Julien Laffaye Date: Sat, 4 Mar 2017 13:34:31 +0100 Subject: [PATCH] Document ServerConn is not safe for concurrent use. Mention textproto.Error so users can access the error code via type assertion (issue #78). --- ftp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ftp.go b/ftp.go index 1f53c05..f7ae157 100644 --- a/ftp.go +++ b/ftp.go @@ -1,4 +1,6 @@ // Package ftp implements a FTP client as described in RFC 959. +// +// A textproto.Error is returned for errors at the protocol level. package ftp import ( @@ -23,6 +25,7 @@ const ( ) // ServerConn represents the connection to a remote FTP server. +// It should be protected from concurrent accesses. type ServerConn struct { // Do not use EPSV mode DisableEPSV bool