Skip to content

Commit

Permalink
fix code typo on batch creating example (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
RanX12 authored Apr 12, 2024
1 parent aa60c74 commit 5538e20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/docs/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ result.RowsAffected // returns inserted records count
We can also create multiple records with `Create()`:
```go
users := []*User{
User{Name: "Jinzhu", Age: 18, Birthday: time.Now()},
User{Name: "Jackson", Age: 19, Birthday: time.Now()},
{Name: "Jinzhu", Age: 18, Birthday: time.Now()},
{Name: "Jackson", Age: 19, Birthday: time.Now()},
}

result := db.Create(users) // pass a slice to insert multiple row
Expand Down

0 comments on commit 5538e20

Please sign in to comment.