From 3e3979ddc6c2c78285fb25b8b0e7b46c719abea5 Mon Sep 17 00:00:00 2001 From: Techassi Date: Fri, 17 Jul 2020 18:01:41 +0200 Subject: [PATCH] Add String() function --- ftp.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ftp.go b/ftp.go index faf1c9c..dadeffe 100644 --- a/ftp.go +++ b/ftp.go @@ -810,3 +810,8 @@ func (r *Response) Close() error { func (r *Response) SetDeadline(t time.Time) error { return r.conn.SetDeadline(t) } + +// String returns the string representation of EntryType t. +func (t EntryType) String() string { + return [...]string{"file", "folder", "link"}[t] +}