Change blacklist to comprise domains.

This commit is contained in:
2024-10-22 15:50:28 +03:00
parent cd60c1363b
commit 3c5206ae43
4 changed files with 13 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ func SaveToFile(rootPath string, s *Snapshot, done chan struct{}) {
func ReadLines(path string) []string {
data, err := os.ReadFile(path)
if err != nil {
panic(fmt.Sprintf("Failed to read blacklist file: %s", err))
panic(fmt.Sprintf("Failed to read file: %s", err))
}
lines := strings.Split(string(data), "\n")
// Remove last line if empty
@@ -108,6 +108,5 @@ func ReadLines(path string) []string {
if lines[len(lines)-1] == "" {
lines = lines[:len(lines)-1]
}
logging.LogInfo("Loaded %d blacklist URLs", len(lines))
return lines
}