Skip to content

Commit

Permalink
docs: fix README typo (go-gorm#530)
Browse files Browse the repository at this point in the history
* fix: README.ZH_CN.md

* fix: README.md and README.ZH_CN.md
  • Loading branch information
StellarisW authored Jul 11, 2022
1 parent 7d4e27e commit 9b0e713
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.ZH_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ type User struct{
ID int32
}
func (u *User)IsEmpty()bool{
if m == nil {
if u == nil {
return true
}
return m.ID == 0
return u.ID == 0
}
user := User{}
// 可以直接添加一个绑定了结构体的方法
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ type User struct{
ID int32
}
func (u *User)IsEmpty()bool{
if m == nil {
if u == nil {
return true
}
return m.ID == 0
return u.ID == 0
}
user := User{}
// add custom method to generated model struct
Expand Down

0 comments on commit 9b0e713

Please sign in to comment.