Last active
February 1, 2020 11:10
-
-
Save yutakahashi114/efa6b14ed4708b323037edaea691ae3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
u.FirstName = "" | |
u.LastName = "" | |
u.FirstNameKana = "更新されない" | |
affected, err = engine. | |
Cols("first_name"). | |
Where("id = ?", id). | |
Update(&u) | |
if err != nil { | |
log.Println(err) | |
return | |
} | |
if affected == 0 { | |
log.Println("Not Found") | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment