reduces character count

This commit is contained in:
Hyatt 2024-01-23 19:45:31 -06:00
parent a055940bf6
commit b7c2beb01c
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -41,6 +41,7 @@ func (c NsUpdateStruct) UpdateTXT(record, recordType, value string) error {
r, err := net.LookupTXT(record) r, err := net.LookupTXT(record)
if err != nil { if err != nil {
config.Cfg.Log.Info("unable to get existing record", "record", record, "error", err) config.Cfg.Log.Info("unable to get existing record", "record", record, "error", err)
return err
} }
var oldTXT string var oldTXT string
@ -135,7 +136,7 @@ func sanitizeTXT(s string) string {
s = "" s = ""
for i, r := range a { for i, r := range a {
s += string(r) s += string(r)
if i > 0 && (i+1)%254 == 0 { if i > 0 && (i+1)%200 == 0 {
s += string(`" "`) s += string(`" "`)
} }
} }