- 新增 SIGINT/SIGTERM 信号处理与 http.Server.Shutdown,退出前确保统计数据保存、数据库正常关闭 - 为 http.Server 设置 ReadHeaderTimeout/ReadTimeout/WriteTimeout/IdleTimeout,防止慢客户端长期占用连接 - 全局配置指针改为 atomic.Pointer 并提供 GetAppConfig 访问器,消除配置热更新时的数据竞争,同时删除冗余的 manager.config 字段 - 请求统计九组计数器重构为 map[string]*atomic.Int64,统一 incrementStat/getStatsSnapshot 访问,精简约 40 行样板代码 - go mod tidy 清理 go.mod 与 go.sum 中的冗余依赖条目
37 lines
1.2 KiB
AMPL
37 lines
1.2 KiB
AMPL
module fanqie
|
|
|
|
go 1.24.0
|
|
|
|
require (
|
|
github.com/PuerkitoBio/goquery v1.8.1
|
|
github.com/fsnotify/fsnotify v1.7.0
|
|
github.com/google/uuid v1.4.0
|
|
github.com/mattn/go-sqlite3 v1.14.18
|
|
github.com/spf13/viper v1.18.2
|
|
)
|
|
|
|
require (
|
|
github.com/andybalholm/cascadia v1.3.1 // indirect
|
|
github.com/google/go-cmp v0.7.0 // indirect
|
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
|
github.com/magiconair/properties v1.8.7 // indirect
|
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
|
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
|
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
|
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
|
github.com/sourcegraph/conc v0.3.0 // indirect
|
|
github.com/spf13/afero v1.11.0 // indirect
|
|
github.com/spf13/cast v1.6.0 // indirect
|
|
github.com/spf13/pflag v1.0.5 // indirect
|
|
github.com/stretchr/testify v1.11.1 // indirect
|
|
github.com/subosito/gotenv v1.6.0 // indirect
|
|
go.uber.org/atomic v1.9.0 // indirect
|
|
go.uber.org/multierr v1.9.0 // indirect
|
|
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
|
|
golang.org/x/net v0.46.0 // indirect
|
|
golang.org/x/sys v0.37.0 // indirect
|
|
golang.org/x/text v0.30.0 // indirect
|
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
)
|