Skip to content

Commit 90bcc31

Browse files
Copilotnomeguy
andcommitted
Address code review feedback: fix typos and remove trailing whitespace
Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
1 parent 6a19390 commit 90bcc31

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ip/ip17mon.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var (
2929
std *Locator
3030
)
3131

32-
// Init defaut locator with dataFile
32+
// Init default locator with dataFile
3333
func Init(dataFile string) (err error) {
3434
if std != nil {
3535
return
@@ -38,7 +38,7 @@ func Init(dataFile string) (err error) {
3838
return
3939
}
4040

41-
// Init defaut locator with data
41+
// Init default locator with data
4242
func InitWithData(data []byte) {
4343
if std != nil {
4444
return

rule/rule_ip.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ func (r *IpRule) checkRule(expressions []*object.Expression, req *http.Request)
3535
}
3636
for _, expression := range expressions {
3737
reason := fmt.Sprintf("expression matched: \"%s %s %s\"", clientIp, expression.Operator, expression.Value)
38-
38+
3939
// Handle "is abroad" operator
4040
if expression.Operator == "is abroad" {
4141
if ip.IsAbroadIp(clientIp) {
4242
return &RuleResult{Reason: reason}, nil
4343
}
4444
continue
4545
}
46-
46+
4747
ips := strings.Split(expression.Value, ",")
4848
for _, ipStr := range ips {
4949
if strings.Contains(ipStr, "/") {

0 commit comments

Comments
 (0)