You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/vendor/github.com/qiniu/go-sdk/v7/err.go

23 lines
375 B

package api
// QINIU SDK error type
// 可以根据Code判断是何种类型错误
type QError struct {
Code string
Message string
}
// Error 继承error接口
func (e *QError) Error() string {
return e.Code + ": " + e.Message
}
// NewError 返回QError指针
func NewError(code, message string) *QError {
return &QError{
Code: code,
Message: message,
}
}