From 361b4457ec914eabc9735be4488d8ccdc1c7a1e5 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Mon, 2 Dec 2024 13:19:50 +0200 Subject: [PATCH] fix: change module in go.mod feat: add 0.0.0.0 to skip list --- cmd/adless/main.go | 3 ++- go.mod | 2 +- internal/action/action.go | 4 ++-- internal/action/config.go | 4 ++-- internal/action/disable.go | 4 ++-- internal/action/enable.go | 4 ++-- internal/action/restore.go | 4 ++-- internal/action/status.go | 4 ++-- internal/action/update.go | 4 ++-- internal/hostsfile/file.go | 2 +- internal/hostsfile/processor.go | 5 +++-- 11 files changed, 21 insertions(+), 19 deletions(-) diff --git a/cmd/adless/main.go b/cmd/adless/main.go index 9685d0f..fd4c75a 100644 --- a/cmd/adless/main.go +++ b/cmd/adless/main.go @@ -1,12 +1,13 @@ package main import ( - "adless/internal/action" "fmt" "os" "sort" "time" + "github.com/WIttyJudge/adless/internal/action" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/urfave/cli/v2" diff --git a/go.mod b/go.mod index 5c27469..ceb1156 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module adless +module github.com/WIttyJudge/adless go 1.22.0 diff --git a/internal/action/action.go b/internal/action/action.go index bdb7e4d..32a7ea9 100644 --- a/internal/action/action.go +++ b/internal/action/action.go @@ -1,8 +1,8 @@ package action import ( - "adless/internal/action/exit" - "adless/internal/config" + "github.com/WIttyJudge/adless/internal/action/exit" + "github.com/WIttyJudge/adless/internal/config" "github.com/rs/zerolog" "github.com/urfave/cli/v2" diff --git a/internal/action/config.go b/internal/action/config.go index 447f308..c1afcd4 100644 --- a/internal/action/config.go +++ b/internal/action/config.go @@ -1,8 +1,8 @@ package action import ( - "adless/internal/action/exit" - "adless/internal/config" + "github.com/WIttyJudge/adless/internal/action/exit" + "github.com/WIttyJudge/adless/internal/config" "github.com/urfave/cli/v2" ) diff --git a/internal/action/disable.go b/internal/action/disable.go index ee74506..b5e9124 100644 --- a/internal/action/disable.go +++ b/internal/action/disable.go @@ -1,8 +1,8 @@ package action import ( - "adless/internal/action/exit" - "adless/internal/hostsfile" + "github.com/WIttyJudge/adless/internal/action/exit" + "github.com/WIttyJudge/adless/internal/hostsfile" "github.com/rs/zerolog/log" "github.com/urfave/cli/v2" diff --git a/internal/action/enable.go b/internal/action/enable.go index 60016d0..8b7d144 100644 --- a/internal/action/enable.go +++ b/internal/action/enable.go @@ -1,8 +1,8 @@ package action import ( - "adless/internal/action/exit" - "adless/internal/hostsfile" + "github.com/WIttyJudge/adless/internal/action/exit" + "github.com/WIttyJudge/adless/internal/hostsfile" "github.com/rs/zerolog/log" "github.com/urfave/cli/v2" diff --git a/internal/action/restore.go b/internal/action/restore.go index 36ddc89..06221da 100644 --- a/internal/action/restore.go +++ b/internal/action/restore.go @@ -1,8 +1,8 @@ package action import ( - "adless/internal/action/exit" - "adless/internal/hostsfile" + "github.com/WIttyJudge/adless/internal/action/exit" + "github.com/WIttyJudge/adless/internal/hostsfile" "github.com/rs/zerolog/log" diff --git a/internal/action/status.go b/internal/action/status.go index b3e52d4..52945ef 100644 --- a/internal/action/status.go +++ b/internal/action/status.go @@ -1,8 +1,8 @@ package action import ( - "adless/internal/action/exit" - "adless/internal/hostsfile" + "github.com/WIttyJudge/adless/internal/action/exit" + "github.com/WIttyJudge/adless/internal/hostsfile" "github.com/rs/zerolog/log" "github.com/urfave/cli/v2" diff --git a/internal/action/update.go b/internal/action/update.go index b01a7fe..4e6e5a3 100644 --- a/internal/action/update.go +++ b/internal/action/update.go @@ -1,8 +1,8 @@ package action import ( - "adless/internal/action/exit" - "adless/internal/hostsfile" + "github.com/WIttyJudge/adless/internal/action/exit" + "github.com/WIttyJudge/adless/internal/hostsfile" "github.com/rs/zerolog/log" "github.com/urfave/cli/v2" diff --git a/internal/hostsfile/file.go b/internal/hostsfile/file.go index 339f2e3..f4e9074 100644 --- a/internal/hostsfile/file.go +++ b/internal/hostsfile/file.go @@ -1,12 +1,12 @@ package hostsfile import ( - "adless/pkg/fsutil" "errors" "fmt" "os" "strings" + "github.com/WIttyJudge/adless/pkg/fsutil" "github.com/rs/zerolog/log" ) diff --git a/internal/hostsfile/processor.go b/internal/hostsfile/processor.go index 2225436..71ad68a 100644 --- a/internal/hostsfile/processor.go +++ b/internal/hostsfile/processor.go @@ -1,13 +1,13 @@ package hostsfile import ( - "adless/internal/config" - "adless/internal/http" "fmt" "slices" "strings" "sync" + "github.com/WIttyJudge/adless/internal/config" + "github.com/WIttyJudge/adless/internal/http" "github.com/rs/zerolog/log" ) @@ -292,6 +292,7 @@ func (p *Processor) IsSkippedDomain(domain string) bool { "ip6-allnodes", "ip6-allrouters", "ip6-allhosts", + "0.0.0.0", } return slices.Contains(skipList, domain)