From 8ed137aff5f131a24ae613abf1263ce72e32a3be Mon Sep 17 00:00:00 2001 From: Yuhui Xu Date: Tue, 2 Jan 2024 11:15:46 -0800 Subject: [PATCH] GCORE: Fix handling very long TXT records (#2744) Co-authored-by: Tom Limoncelli --- providers/gcore/convert.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/providers/gcore/convert.go b/providers/gcore/convert.go index b5c1cc6bf..b57b95641 100644 --- a/providers/gcore/convert.go +++ b/providers/gcore/convert.go @@ -86,7 +86,7 @@ func recordsToNative(rcs []*models.RecordConfig, expectedKey models.RecordKey) * } case "TXT": // Avoid double quoting for TXT records rr = dnssdk.ResourceRecord{ - Content: convertTxtSliceToSdkAnySlice(r.GetTargetTXTSegmented()), + Content: convertTxtSliceToSdkAnySlice(r.GetTargetTXTJoined()), Meta: nil, Enabled: true, } @@ -119,11 +119,8 @@ func recordsToNative(rcs []*models.RecordConfig, expectedKey models.RecordKey) * return result } -func convertTxtSliceToSdkAnySlice(records []string) []any { - result := []any{} - for _, record := range records { - result = append(result, record) - } +func convertTxtSliceToSdkAnySlice(record string) []any { + result := []any{record} return result }