code: func (c *Client) IntervalsWithLimit(limit int) (intervals []contract.Interval, err error) {
  	conn := c.Pool.Get()
  	defer conn.Close()
  
  	objects, err := getObjectsByRange(conn, models.IntervalKey, 0, limit-1)
  	if err != nil {
  		if err != redis.ErrNil {
  			return intervals, err
  		}
  	}
  
  	intervals = make([]contract.Interval, len(objects))
  	for i, object := range objects {
  		err = json.Unmarshal(object, &intervals[i])
  		if err != nil {
  			return []contract.Interval{}, err
  		}
  	}
  
  	return intervals, nil
  }
docs: // Return schedule interval(s) up to the number specified