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

MAINT: Update TXT docs, suggest not using TxtNoLen255 (#1548)

* suggest not using TxtNoLen255

* Rename functions

* wip!

* fixing!
This commit is contained in:
Tom Limoncelli
2022-06-20 11:34:05 -04:00
committed by GitHub
parent 691710d39e
commit 959f721c04
7 changed files with 159 additions and 64 deletions

View File

@@ -57,8 +57,9 @@ func TxtNoDoubleQuotes(records []*models.RecordConfig) error {
return nil
}
// TxtNoLen255 audits TXT records for strings exactly 255 octets long.
func TxtNoLen255(records []*models.RecordConfig) error {
// TxtNoStringsExactlyLen255 audits TXT records for strings exactly 255 octets long.
// This is rare; you probably want to use TxtNoLongStrings() instead.
func TxtNoStringsExactlyLen255(records []*models.RecordConfig) error {
for _, rc := range records {
if rc.HasFormatIdenticalToTXT() { // TXT and similar:
@@ -73,8 +74,8 @@ func TxtNoLen255(records []*models.RecordConfig) error {
return nil
}
// TxtNoLongStrings audits TXT records for strings that are >255 octets.
func TxtNoLongStrings(records []*models.RecordConfig) error {
// TxtNoStringsLen256orLonger audits TXT records for strings that are >255 octets.
func TxtNoStringsLen256orLonger(records []*models.RecordConfig) error {
for _, rc := range records {
if rc.HasFormatIdenticalToTXT() { // TXT and similar: