go-chat/user/user.go
2021-04-22 14:12:35 +08:00

18 lines
240 B
Go

package user
import "errors"
type User struct {
Id int
Name string
Sex int8
Password string
}
func (u *User) CheckPassword(p string) error {
if p != u.Password {
return errors.New("password error")
}
return nil
}