func (p *dnsimpleProvider) GetRecordID(zone string, recordName string) (recordID int, err error) {
	page := 1
	listOptions := &dnsimple.ZoneRecordListOptions{Name: recordName}
	for {
		listOptions.Page = page
		records, err := p.client.ListRecords(p.accountID, zone, listOptions)
		if err != nil {
			return 0, err
		}

		for _, record := range records.Data {
			if record.Name == recordName {
				return record.ID, nil
			}
		}

		page++
		if page > records.Pagination.TotalPages {
			break
		}
	}
	return 0, fmt.Errorf("No record id found")
}
func (p *dnsimpleProvider) GetRecordID(zone string, recordName string) (recordID int, err error) {
	page := 1
	listOptions := &dnsimple.ZoneRecordListOptions{Name: recordName}
	for {
		listOptions.Page = page
		records, err := p.client.ListRecords(p.accountID, zone, listOptions)
		if err != nil {
			return 0, err
		}

		for _, record := range records.Data {
			if record.Name == recordName {
				return record.ID, nil
			}
		}

		page++
		if page > records.Pagination.TotalPages {
			break
		}
	}
	return 0, fmt.Errorf("No record id found")
}
func ( p * dnsimpleProvider ) GetRecordID ( zone string , recordName string ) ( recordID int , err error ) { page := 1 listOptions := & dnsimple . ZoneRecordListOptions { Name : recordName } for { listOptions . Page = page records , err := p . client . ListRecords ( p . accountID , zone , listOptions ) if err != nil { return 0 , err } for _ , record := range records . Data { if record . Name == recordName { return record . ID , nil } } page ++ if page > records . Pagination . TotalPages { break } } return 0 , fmt . Errorf ( " " ) }
// Returns the record ID for a given record name and zone
Returns the record ID for a given record name and zone