移除不再使用的godotenv依赖和相关代码,简化主程序逻辑。

This commit is contained in:
wood chen 2025-03-22 19:57:16 +08:00
parent a141672243
commit ef1bec7710
2 changed files with 0 additions and 7 deletions

1
go.mod
View File

@ -4,7 +4,6 @@ go 1.23.1
require ( require (
github.com/andybalholm/brotli v1.1.1 github.com/andybalholm/brotli v1.1.1
github.com/joho/godotenv v1.5.1
golang.org/x/net v0.37.0 golang.org/x/net v0.37.0
) )

View File

@ -15,8 +15,6 @@ import (
"proxy-go/internal/middleware" "proxy-go/internal/middleware"
"strings" "strings"
"syscall" "syscall"
"github.com/joho/godotenv"
) )
// Route 定义路由结构 // Route 定义路由结构
@ -28,10 +26,6 @@ type Route struct {
} }
func main() { func main() {
// 加载.env文件
if err := godotenv.Load(); err != nil {
log.Printf("警告: 无法加载.env文件: %v", err)
}
// 初始化应用程序(包括配置迁移) // 初始化应用程序(包括配置迁移)
configPath := "data/config.json" configPath := "data/config.json"