fix(lint): 修复代码清理和lint警告
- 移除 proxy.go 未使用的 protoHTTPS 常量 - 修复 api_shared_dict.go 无效赋值警告 - 修复 certpool.go unused-parameter 警告 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6a08a6ab4a
commit
78c49f7288
@ -347,8 +347,7 @@ func dictFlushExpired(L *glua.LState) int {
|
||||
// dictGetKeys 获取所有键
|
||||
// dict:get_keys(max_count?) -> keys
|
||||
func dictGetKeys(L *glua.LState) int {
|
||||
//nolint:ineffassign,unused
|
||||
_ = checkSharedDict(L)
|
||||
checkSharedDict(L) // 验证参数但不使用返回值
|
||||
|
||||
// 暂不实现完整版,返回空表
|
||||
keys := L.NewTable()
|
||||
|
||||
@ -56,10 +56,6 @@ const (
|
||||
// upstreamCache 上游缓存标识
|
||||
// 用于标记请求可直接使用缓存响应,无需转发到上游
|
||||
upstreamCache = "CACHE"
|
||||
|
||||
// protoHTTPS 使用 HTTPS 协议
|
||||
// 标记与上游目标通信时使用 HTTPS 加密传输
|
||||
protoHTTPS = "https"
|
||||
)
|
||||
|
||||
// Proxy 表示反向代理实例,负责将 HTTP 请求转发到后端目标。
|
||||
|
||||
@ -13,12 +13,11 @@ import (
|
||||
//
|
||||
// Parameters:
|
||||
// - certFile: Certificate file path
|
||||
// - context: Context description for error messages
|
||||
//
|
||||
// Returns:
|
||||
// - *x509.CertPool: Certificate pool
|
||||
// - error: Returns error if loading fails
|
||||
func LoadCertPool(certFile string, context string) (*x509.CertPool, error) {
|
||||
func LoadCertPool(certFile string, _ string) (*x509.CertPool, error) {
|
||||
data, err := os.ReadFile(certFile)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read certificate file: %w", err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user