Explorar o código

StatusText returns a text for the FTP status code

Julien Laffaye %!s(int64=7) %!d(string=hai) anos
pai
achega
72f5c01749
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      status.go

+ 5 - 0
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]
+}