mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-19 08:51:55 +08:00
移除不再使用的godotenv依赖和相关代码,简化主程序逻辑。
This commit is contained in:
parent
a141672243
commit
ef1bec7710
1
go.mod
1
go.mod
@ -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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
6
main.go
6
main.go
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user