mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-16 20:39:08 +08:00
befb52be86
* Fix typo and add sandbox information * Use SetTargetTXT in GetZoneRecords This fixes the behavior documented in #1622 Also apply cleanup to GetZoneRecords * Remove SetTargetTXT, does not work in all tests * Set The most correct TXT handling * Well, There's your problem * Add an audit and test for unpaired quotes * Add some commentary Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
29 lines
742 B
Go
29 lines
742 B
Go
package dnsimple
|
|
|
|
import (
|
|
"github.com/StackExchange/dnscontrol/v3/models"
|
|
"github.com/StackExchange/dnscontrol/v3/pkg/recordaudit"
|
|
)
|
|
|
|
// AuditRecords returns an error if any records are not
|
|
// supportable by this provider.
|
|
func AuditRecords(records []*models.RecordConfig) error {
|
|
//TODO(onlyhavecans) I think we can support multiple strings.
|
|
if err := recordaudit.TxtNoMultipleStrings(records); err != nil {
|
|
return err
|
|
}
|
|
|
|
if err := recordaudit.TxtNoTrailingSpace(records); err != nil {
|
|
return err
|
|
} // as of 2022-07
|
|
|
|
if err := recordaudit.TxtNotEmpty(records); err != nil {
|
|
return err
|
|
} // as of 2022-07
|
|
|
|
if err := recordaudit.TxtNoUnpairedDoubleQuotes(records); err != nil {
|
|
return err
|
|
} // as of 2022-07
|
|
|
|
return nil
|
|
}
|