deal with dig txt format
This commit is contained in:
parent
d0b77929f7
commit
4e03fcda83
@ -51,7 +51,9 @@ func (c NsUpdateStruct) UpdateTXT(record, recordType, value string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
oldTXT := stdout.String()
|
oldTXT := strings.TrimLeft(strings.TrimRight(stdout.String(), "\n\""), "\"")
|
||||||
|
config.Cfg.Log.Debug("existing record", "record", strings.ReplaceAll(oldTXT, `" "`, ``))
|
||||||
|
config.Cfg.Log.Debug("new record", "record", strings.ReplaceAll(value, `" "`, ``))
|
||||||
|
|
||||||
if strings.ReplaceAll(oldTXT, `" "`, ``) != strings.ReplaceAll(value, `" "`, ``) {
|
if strings.ReplaceAll(oldTXT, `" "`, ``) != strings.ReplaceAll(value, `" "`, ``) {
|
||||||
config.Cfg.Log.Debug("deleting record", "record", record)
|
config.Cfg.Log.Debug("deleting record", "record", record)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user