1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
This commit is contained in:
Tom Limoncelli
2023-10-18 11:16:31 -04:00
parent 5c8d51e235
commit e89922d158
3 changed files with 2 additions and 7 deletions

View File

@ -351,11 +351,7 @@ func formatDsl(zonename string, rec *models.RecordConfig, defaultTTL uint32) str
case "TLSA":
target = fmt.Sprintf(`%d, %d, %d, "%s"`, rec.TlsaUsage, rec.TlsaSelector, rec.TlsaMatchingType, rec.GetTargetField())
case "TXT":
if len(rec.TxtStrings) == 1 {
target = `"` + rec.TxtStrings[0] + `"`
} else {
target = `["` + strings.Join(rec.TxtStrings, `", "`) + `"]`
}
target = jsonQuoted(rec.GetTargetField())
// TODO(tlim): If this is an SPF record, generate a SPF_BUILDER().
case "NS":
// NS records at the apex should be NAMESERVER() records.