fix: variable type in store

This commit is contained in:
Steven
2023-06-23 00:54:54 +08:00
parent 407a8cc7fb
commit 8dfae8a6aa
5 changed files with 30 additions and 29 deletions

View File

@ -272,7 +272,7 @@ func listUsers(ctx context.Context, tx *sql.Tx, find *FindUser) ([]*User, error)
list := make([]*User, 0)
for rows.Next() {
user := User{}
user := &User{}
if err := rows.Scan(
&user.ID,
&user.CreatedTs,
@ -286,7 +286,7 @@ func listUsers(ctx context.Context, tx *sql.Tx, find *FindUser) ([]*User, error)
); err != nil {
return nil, err
}
list = append(list, &user)
list = append(list, user)
}
if err := rows.Err(); err != nil {