Skip to content

Commit 60fbaa9

Browse files
authored
remove not needed (#19128)
1 parent fda5b9f commit 60fbaa9

File tree

3 files changed

+2
-73
lines changed

3 files changed

+2
-73
lines changed

modules/hostmatcher/hostmatcher.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import (
88
"net"
99
"path/filepath"
1010
"strings"
11-
12-
"code.gitea.io/gitea/modules/util"
1311
)
1412

1513
// HostMatchList is used to check if a host or IP is in a list.
@@ -104,11 +102,11 @@ func (hl *HostMatchList) checkIP(ip net.IP) bool {
104102
for _, builtin := range hl.builtins {
105103
switch builtin {
106104
case MatchBuiltinExternal:
107-
if ip.IsGlobalUnicast() && !util.IsIPPrivate(ip) {
105+
if ip.IsGlobalUnicast() && !ip.IsPrivate() {
108106
return true
109107
}
110108
case MatchBuiltinPrivate:
111-
if util.IsIPPrivate(ip) {
109+
if ip.IsPrivate() {
112110
return true
113111
}
114112
case MatchBuiltinLoopback:

modules/util/net.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

modules/util/net_test.go

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)