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