func (p *CloudFlareProvider) Zones() ([]cloudflare.Zone, error) {
	result := []cloudflare.Zone{}
	ctx := context.TODO()
	p.PaginationOptions.Page = 1

	for {
		zonesResponse, err := p.Client.ListZonesContext(ctx, cloudflare.WithPagination(p.PaginationOptions))
		if err != nil {
			return nil, err
		}

		for _, zone := range zonesResponse.Result {
			if !p.domainFilter.Match(zone.Name) {
				continue
			}

			if !p.zoneIDFilter.Match(zone.ID) {
				continue
			}
			result = append(result, zone)
		}
		if p.PaginationOptions.Page == zonesResponse.ResultInfo.TotalPages {
			break
		}
		p.PaginationOptions.Page++
	}
	return result, nil
}
func (p *CloudFlareProvider) Zones() ([]cloudflare.Zone, error) {
	result := []cloudflare.Zone{}
	ctx := context.TODO()
	p.PaginationOptions.Page = 1

	for {
		zonesResponse, err := p.Client.ListZonesContext(ctx, cloudflare.WithPagination(p.PaginationOptions))
		if err != nil {
			return nil, err
		}

		for _, zone := range zonesResponse.Result {
			if !p.domainFilter.Match(zone.Name) {
				continue
			}

			if !p.zoneIDFilter.Match(zone.ID) {
				continue
			}
			result = append(result, zone)
		}
		if p.PaginationOptions.Page == zonesResponse.ResultInfo.TotalPages {
			break
		}
		p.PaginationOptions.Page++
	}
	return result, nil
}
func ( p * CloudFlareProvider ) Zones ( ) ( [ ] cloudflare . Zone , error ) { result := [ ] cloudflare . Zone { } ctx := context . TODO ( ) p . PaginationOptions . Page = 1 for { zonesResponse , err := p . Client . ListZonesContext ( ctx , cloudflare . WithPagination ( p . PaginationOptions ) ) if err != nil { return nil , err } for _ , zone := range zonesResponse . Result { if ! p . domainFilter . Match ( zone . Name ) { continue } if ! p . zoneIDFilter . Match ( zone . ID ) { continue } result = append ( result , zone ) } if p . PaginationOptions . Page == zonesResponse . ResultInfo . TotalPages { break } p . PaginationOptions . Page ++ } return result , nil }
// Zones returns the list of hosted zones.
Zones returns the list of hosted zones .