1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Add SPF support for RecordConfig (#1020)

This type is identical to TXT but used for other purposes, it is
officially supported by OctoDNS.

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Armand Grillet
2021-01-24 21:36:48 +01:00
committed by GitHub
parent 945ffb7e80
commit 0d9cc35deb
6 changed files with 27 additions and 13 deletions

View File

@@ -23,7 +23,7 @@ so that it is easy to do things the right way in preparation.
// GetTargetField returns the target. There may be other fields (for example
// an MX record also has a .MxPreference field.
func (rc *RecordConfig) GetTargetField() string {
if rc.Type == "TXT" {
if rc.HasFormatIdenticalToTXT() {
return strings.Join(rc.TxtStrings, "")
}
return rc.Target