mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
fixup!
This commit is contained in:
@ -69,6 +69,10 @@ func (rc *RecordConfig) GetTargetTXTSegmentCount() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func splitChunks(buf string, lim int) []string {
|
func splitChunks(buf string, lim int) []string {
|
||||||
|
if len(buf) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var chunk string
|
var chunk string
|
||||||
chunks := make([]string, 0, len(buf)/lim+1)
|
chunks := make([]string, 0, len(buf)/lim+1)
|
||||||
for len(buf) >= lim {
|
for len(buf) >= lim {
|
||||||
|
@ -521,8 +521,7 @@ func (a *azurednsProvider) recordToNativeDiff2(recordKey models.RecordKey, recor
|
|||||||
if recordSet.Properties.TxtRecords == nil {
|
if recordSet.Properties.TxtRecords == nil {
|
||||||
recordSet.Properties.TxtRecords = []*adns.TxtRecord{}
|
recordSet.Properties.TxtRecords = []*adns.TxtRecord{}
|
||||||
}
|
}
|
||||||
// Empty TXT record needs to have no value set in it's properties
|
if rec.GetTargetTXTJoined() != "" { // Empty TXT record needs to have no value set in it's properties
|
||||||
if !(rec.GetTargetTXTSegmentCount() == 1 && rec.GetTargetTXTSegmented()[0] == "") {
|
|
||||||
var txts []*string
|
var txts []*string
|
||||||
for _, txt := range rec.GetTargetTXTSegmented() {
|
for _, txt := range rec.GetTargetTXTSegmented() {
|
||||||
txts = append(txts, to.StringPtr(txt))
|
txts = append(txts, to.StringPtr(txt))
|
||||||
|
Reference in New Issue
Block a user