func (u *UserRepository) ByUsername(username string) (*model.User, error) {
	if user, ok := u.Users[username]; ok {
		return user, nil
	}
	return nil, model.ErrNotFound
}
// ByUsername finds a user by their username.
ByUsername finds a user by their username.
// ByUsername finds a user by their username .
func (u *UserRepository) ByUsername(username string) (*model.User, error) {
	if user, ok := u.Users[username]; ok {
		return user, nil
	}
	return nil, model.ErrNotFound
}
func ( u * UserRepository ) ByUsername ( username string ) ( * model . User , error ) { if user , ok := u . Users [ username ] ; ok { return user , nil } return nil , model . ErrNotFound }
ByUsername finds a user by their username.
ByUsername finds a user by their username .