spider-core/biliapi/error.go

18 lines
257 B
Go
Raw Normal View History

2022-12-20 21:35:30 +08:00
package biliapi
type APIError struct {
Msg string
}
func (err APIError) Error() string {
return err.Msg
}
func NewAPIError(msg string) APIError {
return APIError{Msg: msg}
}
func MissingParamError() APIError {
return APIError{Msg: "缺少参数"}
}