mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
update err return
This commit is contained in:
@ -7,7 +7,6 @@
|
||||
package gdb
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/container/gset"
|
||||
"github.com/gogf/gf/text/gstr"
|
||||
@ -136,7 +135,7 @@ func (m *Model) HasField(field string) (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
if len(tableFields) == 0 {
|
||||
return false, errors.New(fmt.Sprintf(`empty table fields for table "%s"`, m.tables))
|
||||
return false, fmt.Errorf(`empty table fields for table "%s"`, m.tables)
|
||||
}
|
||||
fieldsArray := make([]string, len(tableFields))
|
||||
for k, v := range tableFields {
|
||||
|
||||
Reference in New Issue
Block a user