style(e2e): 清理代码格式和未使用的导入

- 删除 loadbalance_e2e_test.go 中未使用的 encoding/json 导入
- 删除 ssl_e2e_test.go 中未使用的 net/http 导入
- 格式化 testutil/config.go 中的结构体字段对齐
- 为多个文件添加末尾换行符

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
xfy 2026-04-23 15:36:42 +08:00
parent 9eaa77478a
commit 2ffcfd782b
7 changed files with 9 additions and 11 deletions

View File

@ -600,7 +600,7 @@ func TestE2EHealthCheckBackupServer(t *testing.T) {
// 构建配置:第二个后端为备份(使用内部地址)
targetOpts := [][]testutil.ProxyTargetOption{
{}, // 主服务器
{}, // 主服务器
{testutil.WithBackup()}, // 备份服务器
}

View File

@ -9,7 +9,6 @@ package e2e
import (
"context"
"encoding/json"
"io"
"net/http"
"testing"

View File

@ -11,7 +11,6 @@ import (
"context"
"crypto/tls"
"io"
"net/http"
"os"
"strings"
"testing"

View File

@ -257,7 +257,7 @@ type SSLOption func(*config.SSLConfig)
func WithHTTP2(enabled bool, maxConcurrentStreams int) SSLOption {
return func(s *config.SSLConfig) {
s.HTTP2 = config.HTTP2Config{
Enabled: enabled,
Enabled: enabled,
MaxConcurrentStreams: maxConcurrentStreams,
}
}
@ -368,8 +368,8 @@ func WithRateLimit(requestRate, burst int) SecurityOption {
func WithAccessControl(allow, deny []string, defaultAction string) SecurityOption {
return func(s *config.SecurityConfig) {
s.Access = config.AccessConfig{
Allow: allow,
Deny: deny,
Allow: allow,
Deny: deny,
Default: defaultAction,
}
}