From 72f5c01749dadfa983f431a3caf5089450d132ae Mon Sep 17 00:00:00 2001 From: Julien Laffaye Date: Tue, 22 Jan 2019 14:54:48 +0100 Subject: [PATCH] StatusText returns a text for the FTP status code --- status.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/status.go b/status.go index e90ca62..7d281b8 100644 --- a/status.go +++ b/status.go @@ -104,3 +104,8 @@ var statusText = map[int]string{ StatusExceededStorage: "Exceeded storage allocation.", StatusBadFileName: "File name not allowed.", } + +// StatusText returns a text for the FTP status code. It returns the empty string if the code is unknown. +func StatusText(code int) string { + return statusText[code] +}