1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-29 17:19:07 -04:00

Fix lint according to golangci-lint (#439)

This commit is contained in:
Loyalsoldier
2020-11-22 05:05:01 +08:00
committed by GitHub
parent f41286a0c7
commit b68f943c78
39 changed files with 96 additions and 137 deletions

View File

@@ -7,7 +7,6 @@ import (
"go.starlark.net/starlark"
"go.starlark.net/syntax"
"v2ray.com/core/common/net"
"v2ray.com/core/common/strmatcher"
"v2ray.com/core/features/routing"
@@ -154,9 +153,8 @@ func NewPortMatcher(list *net.PortList, onSource bool) *PortMatcher {
func (v *PortMatcher) Apply(ctx routing.Context) bool {
if v.onSource {
return v.port.Contains(ctx.GetSourcePort())
} else {
return v.port.Contains(ctx.GetTargetPort())
}
return v.port.Contains(ctx.GetTargetPort())
}
type NetworkMatcher struct {