dnscontrol/pkg/rejectif/caa.go
Tom Limoncelli 31723ad146
PERFORMANCE: Refactor auditrecords.go to loop only once #1570 (#1658)
* stash

* Use rejectif idea

* rename

* wip!

* Convert old systems to new

* fixup!

* fix typo
2022-08-11 17:24:47 -04:00

18 lines
395 B
Go

package rejectif
import (
"fmt"
"strings"
"github.com/StackExchange/dnscontrol/v3/models"
)
// Keep these in alphabetical order.
// CaaTargetHasSemicolon audits CAA records for issues that contain semicolons.
func CaaTargetHasSemicolon(rc *models.RecordConfig) error {
if strings.Contains(rc.GetTargetField(), ";") {
return fmt.Errorf("caa target contains semicolon")
}
return nil
}