mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
Fix coding style lints
This commit is contained in:
parent
04275b6991
commit
85b04d1af9
@ -3,13 +3,14 @@ package router
|
||||
import (
|
||||
"context"
|
||||
|
||||
"google.golang.org/protobuf/runtime/protoiface"
|
||||
|
||||
core "github.com/v2fly/v2ray-core/v5"
|
||||
"github.com/v2fly/v2ray-core/v5/app/observatory"
|
||||
"github.com/v2fly/v2ray-core/v5/common"
|
||||
"github.com/v2fly/v2ray-core/v5/common/dice"
|
||||
"github.com/v2fly/v2ray-core/v5/features"
|
||||
"github.com/v2fly/v2ray-core/v5/features/extension"
|
||||
"google.golang.org/protobuf/runtime/protoiface"
|
||||
)
|
||||
|
||||
// RandomStrategy represents a random balancing strategy
|
||||
|
@ -4,11 +4,12 @@ package dice
|
||||
|
||||
import (
|
||||
crand "crypto/rand"
|
||||
"github.com/v2fly/v2ray-core/v5/common"
|
||||
"io"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/v2fly/v2ray-core/v5/common"
|
||||
)
|
||||
|
||||
// Roll returns a non-negative number between 0 (inclusive) and n (exclusive).
|
||||
|
@ -141,7 +141,7 @@ func (c *TrojanServerConfig) Build() (proto.Message, error) {
|
||||
return nil, newError(`Trojan fallbacks: "path" must be empty or start with "/"`)
|
||||
}
|
||||
if fb.Type == "" && fb.Dest != "" {
|
||||
if fb.Dest == "serve-ws-none" {
|
||||
if fb.Dest == "serve-ws-none" { // nolint:gocritic
|
||||
fb.Type = "serve"
|
||||
} else if filepath.IsAbs(fb.Dest) || fb.Dest[0] == '@' {
|
||||
fb.Type = "unix"
|
||||
|
@ -90,7 +90,7 @@ func (c *VLessInboundConfig) Build() (proto.Message, error) {
|
||||
return nil, newError(`VLESS fallbacks: "path" must be empty or start with "/"`)
|
||||
}
|
||||
if fb.Type == "" && fb.Dest != "" {
|
||||
if fb.Dest == "serve-ws-none" {
|
||||
if fb.Dest == "serve-ws-none" { // nolint:gocritic
|
||||
fb.Type = "serve"
|
||||
} else if filepath.IsAbs(fb.Dest) || fb.Dest[0] == '@' {
|
||||
fb.Type = "unix"
|
||||
|
@ -5,16 +5,15 @@ import (
|
||||
"crypto/cipher"
|
||||
cryptoRand "crypto/rand"
|
||||
"encoding/binary"
|
||||
"github.com/v2fly/v2ray-core/v5/common/dice"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/v2fly/v2ray-core/v5/common"
|
||||
|
||||
"github.com/lunixbochs/struc"
|
||||
|
||||
"github.com/v2fly/v2ray-core/v5/common"
|
||||
"github.com/v2fly/v2ray-core/v5/common/buf"
|
||||
"github.com/v2fly/v2ray-core/v5/common/crypto"
|
||||
"github.com/v2fly/v2ray-core/v5/common/dice"
|
||||
"github.com/v2fly/v2ray-core/v5/common/net"
|
||||
"github.com/v2fly/v2ray-core/v5/common/protocol"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user