use std slices package (#4008)

This commit is contained in:
fatedier
2024-02-20 12:01:41 +08:00
committed by GitHub
parent b6361fb143
commit 3e0c78233a
22 changed files with 75 additions and 84 deletions

View File

@ -17,9 +17,8 @@ package nathole
import (
"fmt"
"net"
"slices"
"strconv"
"github.com/samber/lo"
)
const (
@ -59,7 +58,7 @@ func ClassifyNATFeature(addresses []string, localIPs []string) (*NatFeature, err
if err != nil {
return nil, err
}
if lo.Contains(localIPs, ip) {
if slices.Contains(localIPs, ip) {
natFeature.PublicNetwork = true
}