From ef1bec7710d2433b2009eca0673f79e03f97364e Mon Sep 17 00:00:00 2001 From: wood chen Date: Sat, 22 Mar 2025 19:57:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=86=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84godotenv=E4=BE=9D=E8=B5=96=E5=92=8C=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BB=A3=E7=A0=81=EF=BC=8C=E7=AE=80=E5=8C=96=E4=B8=BB?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E9=80=BB=E8=BE=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 1 - main.go | 6 ------ 2 files changed, 7 deletions(-) diff --git a/go.mod b/go.mod index 84fd138..2b9d1d4 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.23.1 require ( github.com/andybalholm/brotli v1.1.1 - github.com/joho/godotenv v1.5.1 golang.org/x/net v0.37.0 ) diff --git a/main.go b/main.go index c22f2aa..7479d78 100644 --- a/main.go +++ b/main.go @@ -15,8 +15,6 @@ import ( "proxy-go/internal/middleware" "strings" "syscall" - - "github.com/joho/godotenv" ) // Route 定义路由结构 @@ -28,10 +26,6 @@ type Route struct { } func main() { - // 加载.env文件 - if err := godotenv.Load(); err != nil { - log.Printf("警告: 无法加载.env文件: %v", err) - } // 初始化应用程序(包括配置迁移) configPath := "data/config.json"