mirror of
https://gitee.com/johng/gf.git
synced 2024-12-01 11:48:09 +08:00
fix issue in unit testing case of package internal/structs
This commit is contained in:
parent
02478371f2
commit
b7b4067973
@ -512,7 +512,7 @@ func (c *Core) Update(table string, data interface{}, condition interface{}, arg
|
||||
}
|
||||
|
||||
// DoUpdate does "UPDATE ... " statement for the table.
|
||||
// This function is usually used for custom interface definition, you do not need call it manually.
|
||||
// This function is usually used for custom interface definition, you do not need to call it manually.
|
||||
func (c *Core) DoUpdate(ctx context.Context, link Link, table string, data interface{}, condition string, args ...interface{}) (result sql.Result, err error) {
|
||||
table = c.QuotePrefixTableName(table)
|
||||
var (
|
||||
|
@ -110,7 +110,10 @@ func Test_Fields(t *testing.T) {
|
||||
Pass string `my-tag1:"pass1" my-tag2:"pass2" params:"pass"`
|
||||
}
|
||||
var user *User
|
||||
fields, _ := structs.Fields(user)
|
||||
fields, _ := structs.Fields(structs.FieldsInput{
|
||||
Pointer: user,
|
||||
RecursiveOption: 0,
|
||||
})
|
||||
t.Assert(len(fields), 3)
|
||||
t.Assert(fields[0].Name(), "Id")
|
||||
t.Assert(fields[1].Name(), "Name")
|
||||
|
Loading…
Reference in New Issue
Block a user