mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-11-05 15:31:49 +08:00
14 lines
249 B
Go
14 lines
249 B
Go
package aliyun
|
|
|
|
import (
|
|
aliyunerrors "github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors"
|
|
)
|
|
|
|
func isError(err error, code string) bool {
|
|
aliyunErr, ok := err.(aliyunerrors.Error)
|
|
if !ok {
|
|
return false
|
|
}
|
|
return aliyunErr.ErrorCode() == code
|
|
}
|