1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 02:08:36 +00:00

remove not needed (#19128)

This commit is contained in:
6543
2022-03-18 20:17:57 +01:00
committed by GitHub
parent fda5b9fc3e
commit 60fbaa9068
3 changed files with 2 additions and 73 deletions

View File

@@ -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.
@@ -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: