统一配置JSON缩进排版并保持摘要与历史兼容
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-08 21:08:36 +08:00
1 parent b705f00b22
commit 560605a8e1
10 files changed
+360 -13

No files matched your search

+2 -2
View File
@@ -157,7 +157,7 @@ func BackupConfig(root string, snapshot RuntimeSnapshot, now time.Time) (string,
if err := pruneBackups(directory, now); err != nil {
return "", err
}
data, err := json.Marshal(snapshot)
data, err := json.MarshalIndent(snapshot, "", " ")
if err != nil {
return "", err
}
@@ -301,7 +301,7 @@ func writeRootConfig(root string, value RootConfig) error {
return err
}
value = normalizeRootConfig(value)
data, err := json.Marshal(value)
data, err := json.MarshalIndent(value, "", " ")
if err != nil {
return err
}