Inform user

This commit is contained in:
maride 2023-10-27 15:44:07 +02:00
parent deb85fe10d
commit 3d0735ae7b

View File

@ -89,6 +89,9 @@ func process(ip net.IP, domains []string) {
lines[lPos] = fmt.Sprintf("%s %s", hostLine, newDomains)
}
found = true
// Inform user
fmt.Printf("Updated the line for '%s' to include '%s'", ipString, newDomains)
}
}
@ -98,6 +101,9 @@ func process(ip net.IP, domains []string) {
date := time.Now().Format("02-01-2006")
newLine := fmt.Sprintf("%s\t%s # Added by ghost on %s", ipString, newDomains, date)
lines = append(lines, newLine)
// Inform user
fmt.Printf("Appended line for '%s' to include '%s'", ipString, newDomains)
}
// Write out again