Skip to content

Commit

Permalink
fix: change module in go.mod
Browse files Browse the repository at this point in the history
feat: add 0.0.0.0 to skip list
  • Loading branch information
WIttyJudge committed Dec 2, 2024
1 parent a7a0e77 commit 361b445
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 19 deletions.
3 changes: 2 additions & 1 deletion cmd/adless/main.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module adless
module github.com/WIttyJudge/adless

go 1.22.0

Expand Down
4 changes: 2 additions & 2 deletions internal/action/action.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions internal/action/config.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/action/disable.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions internal/action/enable.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions internal/action/restore.go
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
4 changes: 2 additions & 2 deletions internal/action/status.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions internal/action/update.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/hostsfile/file.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
5 changes: 3 additions & 2 deletions internal/hostsfile/processor.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 361b445

Please sign in to comment.