15 lines
264 B
Go
15 lines
264 B
Go
package errors
|
|
|
|
import "strings"
|
|
|
|
// IsResourceNotFound 判断是否为资源无法查看错误
|
|
func IsResourceNotFound(err error) bool {
|
|
if err == nil {
|
|
return false
|
|
}
|
|
if strings.Contains(err.Error(), "resource not found") {
|
|
return true
|
|
}
|
|
return false
|
|
}
|