mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
simplifying if-else chains to switches (#6208)
This commit is contained in:
@@ -375,20 +375,14 @@ func (e BackendDown) Error() string {
|
||||
|
||||
// isErrIncompleteBody - Check if error type is IncompleteBody.
|
||||
func isErrIncompleteBody(err error) bool {
|
||||
switch err.(type) {
|
||||
case IncompleteBody:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
_, ok := err.(IncompleteBody)
|
||||
return ok
|
||||
}
|
||||
|
||||
// isErrObjectNotFound - Check if error type is ObjectNotFound.
|
||||
func isErrObjectNotFound(err error) bool {
|
||||
switch err.(type) {
|
||||
case ObjectNotFound:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
_, ok := err.(ObjectNotFound)
|
||||
return ok
|
||||
}
|
||||
|
||||
// isInsufficientReadQuorum - Check if error type is InsufficientReadQuorum.
|
||||
|
||||
Reference in New Issue
Block a user