"if" in golang style

This commit is contained in:
Sergey Lanzman 2017-11-14 14:36:53 +02:00 committed by GitHub
parent 263ef914f1
commit 3586dc30c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ func (u *User) BeforeUpdate() (err error) {
// Rollback the insertion if user's id greater than 1000
func (u *User) AfterCreate() (err error) {
if (u.Id > 1000) {
if u.Id > 1000 {
err = errors.New("user id is already greater than 1000")
}
return