//Likers list the latest `limit` articles likers from offset `start`
Likers list the latest `limit` articles likers from offset `start`
// Likers list the latest ` limit ` articles likers from offset ` start `
func (article *Article) Likers(start, limit int64) ([]User, error) {
	uids := cache.RedisClient.ZRevRange(cache.ArticleLikersKey(article.ID), start, start+limit).Val()
	var users []User
	if err := DB.Where("id in (?)", uids).Find(&users).Error; err != nil {
		return nil, err
	}
	return users, nil
}
func ( article * Article ) Likers ( start , limit int64 ) ( [ ] User , error ) { uids := cache . RedisClient . ZRevRange ( cache . ArticleLikersKey ( article . ID ) , start , start + limit ) . Val ( ) var users [ ] User if err := DB . Where ( " " , uids ) . Find ( & users ) . Error ; err != nil { return nil , err } return users , nil }
Likers list the latest `limit` articles likers from offset `start`
Likers list the latest ` limit ` articles likers from offset ` start `