支持环境变量覆盖运行配置

This commit is contained in:
xuans committed 2026-08-30 21:01:35 +08:00
1 parent 8ba644d7b3
commit fc2397935b
5 files changed
+148 -2

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ func main() {
if path == "" {
path = filepath.Join(config.DefaultPaths(*baseDir).Config, "scert.json")
}
cfg, err := config.Load(path)
cfg, err := config.LoadWithEnv(path)
if err != nil {
fmt.Fprintln(os.Stderr, "读取配置失败:", err)
os.Exit(1)