1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-20 20:49:12 -04:00

Lint: update linter config & fix code style (#1089)

* Lint: update linter config
* Fix: code style
This commit is contained in:
Loyalsoldier
2021-06-22 22:36:23 +08:00
committed by GitHub
parent 841469bd17
commit d7a202a705
11 changed files with 15 additions and 16 deletions

View File

@@ -5,11 +5,10 @@ import (
"encoding/binary"
"hash/fnv"
"github.com/v2fly/v2ray-core/v4/common/crypto"
"golang.org/x/crypto/sha3"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/crypto"
)
// Authenticate authenticates a byte array using Fnv hash.

View File

@@ -13,8 +13,6 @@ import (
"hash/fnv"
"io"
"github.com/v2fly/v2ray-core/v4/common/drain"
"golang.org/x/crypto/chacha20poly1305"
"github.com/v2fly/v2ray-core/v4/common"
@@ -22,6 +20,7 @@ import (
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/crypto"
"github.com/v2fly/v2ray-core/v4/common/dice"
"github.com/v2fly/v2ray-core/v4/common/drain"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"

View File

@@ -12,14 +12,13 @@ import (
"sync"
"time"
"github.com/v2fly/v2ray-core/v4/common/drain"
"golang.org/x/crypto/chacha20poly1305"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/bitmask"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/crypto"
"github.com/v2fly/v2ray-core/v4/common/drain"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/task"
@@ -141,7 +140,6 @@ func (s *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
buffer := buf.New()
drainer, err := drain.NewBehaviorSeedLimitedDrainer(int64(s.userValidator.GetBehaviorSeed()), 16+38, 3266, 64)
if err != nil {
return nil, newError("failed to initialize drainer").Base(err)
}