• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jlaffaye / ftp / 8113579643

01 Mar 2024 03:23PM UTC coverage: 72.431%. Remained the same
8113579643

Pull #365

github

web-flow
Bump github.com/stretchr/testify from 1.8.4 to 1.9.0

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #365: Bump github.com/stretchr/testify from 1.8.4 to 1.9.0

712 of 983 relevant lines covered (72.43%)

18.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/status.go
1
package ftp
2

3
import "fmt"
4

5
// FTP status codes, defined in RFC 959
6
const (
7
        StatusInitiating    = 100
8
        StatusRestartMarker = 110
9
        StatusReadyMinute   = 120
10
        StatusAlreadyOpen   = 125
11
        StatusAboutToSend   = 150
12

13
        StatusCommandOK             = 200
14
        StatusCommandNotImplemented = 202
15
        StatusSystem                = 211
16
        StatusDirectory             = 212
17
        StatusFile                  = 213
18
        StatusHelp                  = 214
19
        StatusName                  = 215
20
        StatusReady                 = 220
21
        StatusClosing               = 221
22
        StatusDataConnectionOpen    = 225
23
        StatusClosingDataConnection = 226
24
        StatusPassiveMode           = 227
25
        StatusLongPassiveMode       = 228
26
        StatusExtendedPassiveMode   = 229
27
        StatusLoggedIn              = 230
28
        StatusLoggedOut             = 231
29
        StatusLogoutAck             = 232
30
        StatusAuthOK                = 234
31
        StatusRequestedFileActionOK = 250
32
        StatusPathCreated           = 257
33

34
        StatusUserOK             = 331
35
        StatusLoginNeedAccount   = 332
36
        StatusRequestFilePending = 350
37

38
        StatusNotAvailable             = 421
39
        StatusCanNotOpenDataConnection = 425
40
        StatusTransfertAborted         = 426
41
        StatusInvalidCredentials       = 430
42
        StatusHostUnavailable          = 434
43
        StatusFileActionIgnored        = 450
44
        StatusActionAborted            = 451
45
        Status452                      = 452
46

47
        StatusBadCommand              = 500
48
        StatusBadArguments            = 501
49
        StatusNotImplemented          = 502
50
        StatusBadSequence             = 503
51
        StatusNotImplementedParameter = 504
52
        StatusNotLoggedIn             = 530
53
        StatusStorNeedAccount         = 532
54
        StatusFileUnavailable         = 550
55
        StatusPageTypeUnknown         = 551
56
        StatusExceededStorage         = 552
57
        StatusBadFileName             = 553
58
)
59

60
var statusText = map[int]string{
61
        // 200
62
        StatusCommandOK:             "Command okay.",
63
        StatusCommandNotImplemented: "Command not implemented, superfluous at this site.",
64
        StatusSystem:                "System status, or system help reply.",
65
        StatusDirectory:             "Directory status.",
66
        StatusFile:                  "File status.",
67
        StatusHelp:                  "Help message.",
68
        StatusName:                  "",
69
        StatusReady:                 "Service ready for new user.",
70
        StatusClosing:               "Service closing control connection.",
71
        StatusDataConnectionOpen:    "Data connection open; no transfer in progress.",
72
        StatusClosingDataConnection: "Closing data connection. Requested file action successful.",
73
        StatusPassiveMode:           "Entering Passive Mode.",
74
        StatusLongPassiveMode:       "Entering Long Passive Mode.",
75
        StatusExtendedPassiveMode:   "Entering Extended Passive Mode.",
76
        StatusLoggedIn:              "User logged in, proceed.",
77
        StatusLoggedOut:             "User logged out; service terminated.",
78
        StatusLogoutAck:             "Logout command noted, will complete when transfer done.",
79
        StatusAuthOK:                "AUTH command OK",
80
        StatusRequestedFileActionOK: "Requested file action okay, completed.",
81
        StatusPathCreated:           "Path created.",
82

83
        // 300
84
        StatusUserOK:             "User name okay, need password.",
85
        StatusLoginNeedAccount:   "Need account for login.",
86
        StatusRequestFilePending: "Requested file action pending further information.",
87

88
        // 400
89
        StatusNotAvailable:             "Service not available, closing control connection.",
90
        StatusCanNotOpenDataConnection: "Can't open data connection.",
91
        StatusTransfertAborted:         "Connection closed; transfer aborted.",
92
        StatusInvalidCredentials:       "Invalid username or password.",
93
        StatusHostUnavailable:          "Requested host unavailable.",
94
        StatusFileActionIgnored:        "Requested file action not taken.",
95
        StatusActionAborted:            "Requested action aborted. Local error in processing.",
96
        Status452:                      "Insufficient storage space in system.",
97

98
        // 500
99
        StatusBadCommand:              "Command unrecognized.",
100
        StatusBadArguments:            "Syntax error in parameters or arguments.",
101
        StatusNotImplemented:          "Command not implemented.",
102
        StatusBadSequence:             "Bad sequence of commands.",
103
        StatusNotImplementedParameter: "Command not implemented for that parameter.",
104
        StatusNotLoggedIn:             "Not logged in.",
105
        StatusStorNeedAccount:         "Need account for storing files.",
106
        StatusFileUnavailable:         "File unavailable.",
107
        StatusPageTypeUnknown:         "Page type unknown.",
108
        StatusExceededStorage:         "Exceeded storage allocation.",
109
        StatusBadFileName:             "File name not allowed.",
110
}
111

112
// StatusText returns a text for the FTP status code. It returns the empty string if the code is unknown.
113
func StatusText(code int) string {
2✔
114
        str, ok := statusText[code]
2✔
115
        if !ok {
3✔
116
                str = fmt.Sprintf("Unknown status code: %d", code)
1✔
117
        }
1✔
118
        return str
2✔
119
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc