StatusText returns a text for the FTP status code

This commit is contained in:
Julien Laffaye 2019-01-22 14:54:48 +01:00
parent f75dead520
commit 72f5c01749

View File

@ -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]
}