strings.Replace replaced by strings.ReplaceAll helper function

This commit is contained in:
Mael G. 2020-12-13 14:37:09 -04:00
parent 465ea91381
commit e28b61e2f0

View file

@ -48,9 +48,9 @@ func GetRecord(entry Record) Record {
record := ExtractAddressFromReverse(entry.Fqdn)
var recordFormated string
if reverseCheck == 1 {
recordFormated = strings.Replace(record, ".", "-", -1)
recordFormated = strings.ReplaceAll(record, ".", "-")
} else {
recordFormated = strings.Replace(record, ":", "-", -1)
recordFormated = strings.ReplaceAll(record, ":", "-")
}
result.Content = fmt.Sprintf(result.Content, recordFormated)
}