func containsResultsInRange(start time.Time, end time.Time, results []time.Time) bool {
	for _, result := range results {
		if (result.Equal(start) || result.After(start)) && result.Before(end) {
			return true
		}
	}
	return false
}
containsResultsInRange returns true if any results are in the range
[start, end).
package twilio
import (
	"context"
	"errors"
	"net/url"
	"strings"
	"time"
	types "github.com/kevinburke/go-types"
)
type Page struct {
	FirstPageURI    string           `json:"first_page_uri"`
	Start           uint             `json:"start"`
	End             uint             `json:"end"`
	NumPages        uint             `json:"num_pages"`
	Total           uint             `json:"total"`
	NextPageURI     types.NullString `json:"next_page_uri"`
	PreviousPageURI types.NullString `json:"previous_page_uri"`
	PageSize        uint             `json:"page_size"`
}
type Meta struct {
	FirstPageURL    string           `json:"first_page_url"`
	NextPageURL     types.NullString `json:"next_page_url"`
	PreviousPageURL types.NullString `json:"previous_page_url"`
	Key             string           `json:"key"`
	Page            uint             `json:"page"`
	PageSize        uint             `json:"page_size"`
}
var NoMoreResults = errors.New("twilio: No more results")
type PageIterator struct {
	client      *Client
	nextPageURI types.NullString
	data        url.Values
	count       uint
	pathPart    string
}
func (p *PageIterator) SetNextPageURI(npuri types.NullString) {
	if npuri.Valid == false {
		p.nextPageURI = npuri
		return
	}
	npuri.String = strings.TrimPrefix(npuri.String, p.client.Base)
	p.nextPageURI = npuri
}
func (p *PageIterator) Next(ctx context.Context, v interface{}) error {
	var err error
	switch {
	case p.nextPageURI.Valid:
		err = p.client.GetNextPage(ctx, p.nextPageURI.String, v)
	case p.count == 0:
		err = p.client.ListResource(ctx, p.pathPart, p.data, v)
	default:
		return NoMoreResults
	}
	if err != nil {
		return err
	}
	p.count++
	return nil
}
func NewPageIterator(client *Client, data url.Values, pathPart string) *PageIterator {
	return &PageIterator{
		data:        data,
		client:      client,
		count:       0,
		nextPageURI: types.NullString{},
		pathPart:    pathPart,
	}
}
func NewNextPageIterator(client *Client, nextPageURI string) *PageIterator {
	if nextPageURI == "" {
		panic("nextpageuri is empty")
	}
	return &PageIterator{
		data:        url.Values{},
		client:      client,
		nextPageURI: types.NullString{Valid: true, String: nextPageURI},
		pathPart:    "",
		count:       0,
	}
}