mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
REFACTOR: providers should not directly access .TxtStrings (#2629)
This commit is contained in:
@@ -525,9 +525,9 @@ func (a *azurednsProvider) recordToNativeDiff2(recordKey models.RecordKey, recor
|
||||
recordSet.Properties.TxtRecords = []*adns.TxtRecord{}
|
||||
}
|
||||
// Empty TXT record needs to have no value set in it's properties
|
||||
if !(len(rec.TxtStrings) == 1 && rec.TxtStrings[0] == "") {
|
||||
if !(rec.GetTargetTXTSegmentCount() == 1 && rec.GetTargetTXTSegmented()[0] == "") {
|
||||
var txts []*string
|
||||
for _, txt := range rec.TxtStrings {
|
||||
for _, txt := range rec.GetTargetTXTSegmented() {
|
||||
txts = append(txts, to.StringPtr(txt))
|
||||
}
|
||||
recordSet.Properties.TxtRecords = append(recordSet.Properties.TxtRecords, &adns.TxtRecord{Value: txts})
|
||||
|
Reference in New Issue
Block a user