From ff2f2b667b04b769558f4f3af2e86015f6549bc7 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Tue, 14 Mar 2023 21:24:15 +0800 Subject: [PATCH] Chore: make test linter happy --- test/.golangci.yaml | 2 +- test/Makefile | 4 ++-- test/clash_test.go | 10 +++++----- test/snell_test.go | 6 +++--- test/ss_test.go | 4 ++-- test/trojan_test.go | 6 +++--- test/vmess_test.go | 6 +++--- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/.golangci.yaml b/test/.golangci.yaml index c09533c..5861b72 100644 --- a/test/.golangci.yaml +++ b/test/.golangci.yaml @@ -10,7 +10,7 @@ linters-settings: gci: sections: - standard - - prefix(github.com/Dreamacro/clash) - default + - prefix(github.com/Dreamacro/clash) staticcheck: go: '1.20' diff --git a/test/Makefile b/test/Makefile index d238be0..827585c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,6 @@ lint: - GOOS=darwin golangci-lint run ./... - GOOS=linux golangci-lint run ./... + GOOS=darwin golangci-lint run --fix ./... + GOOS=linux golangci-lint run --fix ./... test: go test -p 1 -v ./... diff --git a/test/clash_test.go b/test/clash_test.go index 98c6a3f..84606ab 100644 --- a/test/clash_test.go +++ b/test/clash_test.go @@ -15,16 +15,16 @@ import ( "testing" "time" - "github.com/Dreamacro/clash/adapter/outbound" - C "github.com/Dreamacro/clash/constant" - "github.com/Dreamacro/clash/hub/executor" - "github.com/Dreamacro/clash/transport/socks5" - "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/docker/go-connections/nat" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/Dreamacro/clash/adapter/outbound" + C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/hub/executor" + "github.com/Dreamacro/clash/transport/socks5" ) const ( diff --git a/test/snell_test.go b/test/snell_test.go index 4c50168..3731400 100644 --- a/test/snell_test.go +++ b/test/snell_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/Dreamacro/clash/adapter/outbound" - C "github.com/Dreamacro/clash/constant" - "github.com/docker/docker/api/types/container" "github.com/stretchr/testify/require" + + "github.com/Dreamacro/clash/adapter/outbound" + C "github.com/Dreamacro/clash/constant" ) func TestClash_SnellObfsHTTP(t *testing.T) { diff --git a/test/ss_test.go b/test/ss_test.go index 1369821..3e93673 100644 --- a/test/ss_test.go +++ b/test/ss_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/Dreamacro/clash/adapter/outbound" - "github.com/docker/docker/api/types/container" "github.com/stretchr/testify/require" + + "github.com/Dreamacro/clash/adapter/outbound" ) func TestClash_Shadowsocks(t *testing.T) { diff --git a/test/trojan_test.go b/test/trojan_test.go index 95f8bd5..89b2547 100644 --- a/test/trojan_test.go +++ b/test/trojan_test.go @@ -6,11 +6,11 @@ import ( "testing" "time" - "github.com/Dreamacro/clash/adapter/outbound" - C "github.com/Dreamacro/clash/constant" - "github.com/docker/docker/api/types/container" "github.com/stretchr/testify/require" + + "github.com/Dreamacro/clash/adapter/outbound" + C "github.com/Dreamacro/clash/constant" ) func TestClash_Trojan(t *testing.T) { diff --git a/test/vmess_test.go b/test/vmess_test.go index a7f40f4..61f9e90 100644 --- a/test/vmess_test.go +++ b/test/vmess_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/Dreamacro/clash/adapter/outbound" - C "github.com/Dreamacro/clash/constant" - "github.com/docker/docker/api/types/container" "github.com/stretchr/testify/require" + + "github.com/Dreamacro/clash/adapter/outbound" + C "github.com/Dreamacro/clash/constant" ) func TestClash_Vmess(t *testing.T) {