Skip to content

Commit

Permalink
remove not needed (go-gitea#19128)
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 authored and Stelios Malathouras committed Mar 28, 2022
1 parent d28bd38 commit 72a56fd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 73 deletions.
6 changes: 2 additions & 4 deletions modules/hostmatcher/hostmatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"net"
"path/filepath"
"strings"

"code.gitea.io/gitea/modules/util"
)

// HostMatchList is used to check if a host or IP is in a list.
Expand Down Expand Up @@ -104,11 +102,11 @@ func (hl *HostMatchList) checkIP(ip net.IP) bool {
for _, builtin := range hl.builtins {
switch builtin {
case MatchBuiltinExternal:
if ip.IsGlobalUnicast() && !util.IsIPPrivate(ip) {
if ip.IsGlobalUnicast() && !ip.IsPrivate() {
return true
}
case MatchBuiltinPrivate:
if util.IsIPPrivate(ip) {
if ip.IsPrivate() {
return true
}
case MatchBuiltinLoopback:
Expand Down
13 changes: 0 additions & 13 deletions modules/util/net.go

This file was deleted.

56 changes: 0 additions & 56 deletions modules/util/net_test.go

This file was deleted.

0 comments on commit 72a56fd

Please sign in to comment.