1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 12:35:21 -05:00

Lint: fix lint (#1427)

* Lint: replace golint with revive
* Lint: fix lint
This commit is contained in:
Loyalsoldier
2021-11-27 17:16:41 +08:00
committed by GitHub
parent 43447aa2e4
commit dce8764fd7
72 changed files with 346 additions and 368 deletions

View File

@@ -53,8 +53,7 @@ func filterMessage(ctx context.Context, message protoreflect.Message) error {
}
if v2extension.ConvertTimeParseIp != "" {
strIp := value.String()
ipValue := net.ParseIP(strIp)
ipValue := net.ParseIP(value.String())
target := message.Descriptor().Fields().ByTextName(v2extension.ConvertTimeParseIp)
pendingWriteQueue = append(pendingWriteQueue, pendingWrite{
field: target,
@@ -116,10 +115,7 @@ func filterMap(ctx context.Context, mapValue protoreflect.Map) error {
var err error
mapValue.Range(func(key protoreflect.MapKey, value protoreflect.Value) bool {
err = filterMessage(ctx, value.Message())
if err != nil {
return false
}
return true
return err == nil
})
return err
}