mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 18:08:57 +08:00
GCORE: Fix handling very long TXT records (#2744)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
parent
fe4e07b3bb
commit
8ed137aff5
1 changed files with 3 additions and 6 deletions
|
@ -86,7 +86,7 @@ func recordsToNative(rcs []*models.RecordConfig, expectedKey models.RecordKey) *
|
||||||
}
|
}
|
||||||
case "TXT": // Avoid double quoting for TXT records
|
case "TXT": // Avoid double quoting for TXT records
|
||||||
rr = dnssdk.ResourceRecord{
|
rr = dnssdk.ResourceRecord{
|
||||||
Content: convertTxtSliceToSdkAnySlice(r.GetTargetTXTSegmented()),
|
Content: convertTxtSliceToSdkAnySlice(r.GetTargetTXTJoined()),
|
||||||
Meta: nil,
|
Meta: nil,
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
}
|
}
|
||||||
|
@ -119,11 +119,8 @@ func recordsToNative(rcs []*models.RecordConfig, expectedKey models.RecordKey) *
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertTxtSliceToSdkAnySlice(records []string) []any {
|
func convertTxtSliceToSdkAnySlice(record string) []any {
|
||||||
result := []any{}
|
result := []any{record}
|
||||||
for _, record := range records {
|
|
||||||
result = append(result, record)
|
|
||||||
}
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue