provider/rcode0.go
func (p *RcodeZeroProvider) fetchRecords(zoneName string) ([]*rc0.RRType, error) {

	var allRecords []*rc0.RRType

	listOptions := rc0.NewListOptions()

	for {
		records, page, err := p.Client.RRSet.List(zoneName, listOptions)

		if err != nil {
			return nil, err
		}

		allRecords = append(allRecords, records...)

		if page == nil || (page.CurrentPage == page.LastPage) {
			break
		}

		listOptions.SetPageNumber(page.CurrentPage + 1)
	}

	return allRecords, nil
}
func (p *RcodeZeroProvider) fetchRecords(zoneName string) ([]*rc0.RRType, error) {

	var allRecords []*rc0.RRType

	listOptions := rc0.NewListOptions()

	for {
		records, page, err := p.Client.RRSet.List(zoneName, listOptions)

		if err != nil {
			return nil, err
		}

		allRecords = append(allRecords, records...)

		if page == nil || (page.CurrentPage == page.LastPage) {
			break
		}

		listOptions.SetPageNumber(page.CurrentPage + 1)
	}

	return allRecords, nil
}
// Helper function