Skip to content

Commit

Permalink
fix: ExtractCriteria source nil return error
Browse files Browse the repository at this point in the history
  • Loading branch information
feymanlee committed Sep 15, 2023
1 parent bed1eab commit bbe3f16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion criteria.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func NewCriteria() *Criteria {
// ExtractCriteria 从结构体导出 Criteria
func ExtractCriteria(source any) (*Criteria, error) {
if source == nil {
return nil, nil
return nil, errors.New("empty source")
}
t := reflect.TypeOf(source)
if t.Kind() != reflect.Struct {
Expand Down

0 comments on commit bbe3f16

Please sign in to comment.