4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-04 17:07:44 +00:00

Update vendor (#1384)

This commit is contained in:
Wim
2021-02-01 21:29:04 +01:00
committed by GitHub
parent 1624f10773
commit 0452be0cb3
37 changed files with 1539 additions and 244 deletions

28
vendor/github.com/slack-go/slack/internal/misc/misc.go generated vendored Normal file
View File

@ -0,0 +1,28 @@
package misc
import (
"fmt"
"net/http"
)
// StatusCodeError represents an http response error.
// type httpStatusCode interface { HTTPStatusCode() int } to handle it.
type StatusCodeError struct {
Code int
Status string
}
func (t StatusCodeError) Error() string {
return fmt.Sprintf("slack server error: %s", t.Status)
}
func (t StatusCodeError) HTTPStatusCode() int {
return t.Code
}
func (t StatusCodeError) Retryable() bool {
if t.Code >= 500 || t.Code == http.StatusTooManyRequests {
return true
}
return false
}