支持环境变量覆盖运行配置
This commit is contained in:
1 parent
8ba644d7b3
commit
fc2397935b
5 files changed
+148
-2
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user