1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-25 17:05:23 +00:00

code style

This commit is contained in:
loyalsoldier 2021-05-04 21:52:35 +08:00 committed by Shelikhoo
parent 40f8e82204
commit 2bdc86049a
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
19 changed files with 23 additions and 38 deletions

View File

@ -5,14 +5,13 @@ import (
"os"
"testing"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
)
func TestStringListUnmarshalError(t *testing.T) {

View File

@ -6,15 +6,13 @@ import (
"sort"
"strings"
"github.com/v2fly/v2ray-core/v4/common/platform"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
"github.com/v2fly/v2ray-core/v4/app/dns"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/platform"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
)
type NameServerConfig struct {

View File

@ -2,9 +2,9 @@ package conf
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/dns"
)

View File

@ -15,7 +15,6 @@ import (
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/infra/conf"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
)

View File

@ -2,8 +2,8 @@ package conf
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
)

View File

@ -4,9 +4,10 @@ import (
"io/ioutil"
"strings"
"google.golang.org/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common/platform"
"google.golang.org/protobuf/proto"
)
type GeoIPCache map[string]*router.GeoIP

View File

@ -5,8 +5,9 @@ import (
"io"
"strings"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"google.golang.org/protobuf/encoding/protowire"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
)
var (

View File

@ -3,12 +3,11 @@ package standard
import (
"strings"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

View File

@ -3,12 +3,11 @@ package conf
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/http"
)

View File

@ -5,13 +5,11 @@ import (
"encoding/json"
"strings"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common/platform"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
"github.com/v2fly/v2ray-core/v4/app/router"
)
type RouterRulesConfig struct {

View File

@ -13,9 +13,8 @@ import (
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
"github.com/v2fly/v2ray-core/v4/infra/conf/rule"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
"github.com/v2fly/v2ray-core/v4/infra/conf/rule"
)
func init() {

View File

@ -3,12 +3,11 @@ package conf
import (
"strings"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/shadowsocks"
)

View File

@ -3,12 +3,11 @@ package conf
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/socks"
)

View File

@ -3,10 +3,9 @@ package conf
import (
"sort"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/http"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/noop"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/srtp"

View File

@ -5,13 +5,12 @@ import (
"encoding/json"
"strings"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket"
"github.com/v2fly/v2ray-core/v4/transport/internet/http"

View File

@ -6,13 +6,12 @@ import (
"strconv"
"syscall"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/trojan"
)

View File

@ -6,13 +6,12 @@ import (
"os"
"strings"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/app/stats"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
)
var (

View File

@ -6,13 +6,12 @@ import (
"strconv"
"syscall"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/vless"
"github.com/v2fly/v2ray-core/v4/proxy/vless/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vless/outbound"

View File

@ -4,12 +4,11 @@ import (
"encoding/json"
"strings"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"