This commit is contained in:
Julien Laffaye 2013-02-17 10:31:56 +01:00
parent 872a244347
commit acaf7edcbc
3 changed files with 95 additions and 88 deletions

View File

@ -39,7 +39,7 @@ func TestParseListLine(t *testing.T) {
t.Errorf("parseListLine(%v).Name = '%v', want '%v'", lt.line, entry.Name, lt.name)
}
if entry.Type != lt.entryType {
t.Errorf("parseListLine(%v).EntryType = %v, want %v", lt.line, entry.Type, lt.entryType,)
t.Errorf("parseListLine(%v).EntryType = %v, want %v", lt.line, entry.Type, lt.entryType)
}
if entry.Size != lt.size {
t.Errorf("parseListLine(%v).Size = %v, want %v", lt.line, entry.Size, lt.size)

View File

@ -7,6 +7,7 @@ const (
StatusReadyMinute = 120
StatusAlreadyOpen = 125
StatusAboutToSend = 150
// Positive Completion reply
StatusCommandOK = 200
StatusCommandNotImplemented = 202
@ -27,10 +28,12 @@ const (
StatusLogoutAck = 232
StatusRequestedFileActionOK = 250
StatusPathCreated = 257
// Positive Intermediate reply
StatusUserOK = 331
StatusLoginNeedAccount = 332
StatusRequestFilePending = 350
// Transient Negative Completion reply
StatusNotAvailable = 421
StatusCanNotOpenDataConnection = 425
@ -40,6 +43,7 @@ const (
StatusFileActionIgnored = 450
StatusActionAborted = 451
Status452 = 452
// Permanent Negative Completion reply
StatusBadCommand = 500
StatusBadArguments = 501
@ -75,10 +79,12 @@ var statusText = map[int]string{
StatusLogoutAck: "Logout command noted, will complete when transfer done.",
StatusRequestedFileActionOK: "Requested file action okay, completed.",
StatusPathCreated: "Path created.",
// 300
StatusUserOK: "User name okay, need password.",
StatusLoginNeedAccount: "Need account for login.",
StatusRequestFilePending: "Requested file action pending further information.",
// 400
StatusNotAvailable: "Service not available, closing control connection.",
StatusCanNotOpenDataConnection: "Can't open data connection.",
@ -88,6 +94,7 @@ var statusText = map[int]string{
StatusFileActionIgnored: "Requested file action not taken.",
StatusActionAborted: "Requested action aborted. Local error in processing.",
Status452: "Insufficient storage space in system.",
// 500
StatusBadCommand: "Command unrecognized.",
StatusBadArguments: "Syntax error in parameters or arguments.",