Skip to content

Commit 3f5d3a2

Browse files
committed
address comment
Signed-off-by: Yijie Qin <[email protected]>
1 parent b28f771 commit 3f5d3a2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

notify/util.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ func (r *Retrier) Check(statusCode int, body io.Reader) (bool, error) {
213213
type ErrorWithReason struct {
214214
Err error
215215

216-
// The reason of the failure.
217216
Reason Reason
218217
}
219218

@@ -228,7 +227,7 @@ func (e *ErrorWithReason) Error() string {
228227
return e.Err.Error()
229228
}
230229

231-
// Reason is the failure reason
230+
// Reason is the failure reason.
232231
type Reason int
233232

234233
const (
@@ -250,12 +249,10 @@ func (s Reason) String() string {
250249
}
251250
}
252251

253-
// possibleFailureReasonCategory is a list of possible failure reason
252+
// possibleFailureReasonCategory is a list of possible failure reason.
254253
var possibleFailureReasonCategory = []string{DefaultReason.String(), ClientErrorReason.String(), ServerErrorReason.String()}
255254

256-
// GetFailureReasonFromStatusCode return the reason for failure request
257-
// the status starts with 4 will return 4xx and starts with 5 will return 5xx
258-
// other than 4xx and 5xx input status will return an 5xx.
255+
// GetFailureReasonFromStatusCode returns the reason for the failure based on the status code provided.
259256
func GetFailureReasonFromStatusCode(statusCode int) Reason {
260257
if statusCode/100 == 4 {
261258
return ClientErrorReason

0 commit comments

Comments
 (0)