code: func mapIntervals(intervals []models.Interval, err error) ([]contract.Interval, error) {
  	if err != nil {
  		return []contract.Interval{}, err
  	}
  	mapped := make([]contract.Interval, 0)
  	for _, interval := range intervals {
  		mapped = append(mapped, interval.ToContract())
  	}
  	return mapped, nil
  }
docs: // Map Intervals