统一配置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
@@ -314,7 +314,7 @@ func writeProtectedConfigFile(name string, cfg *Config) error {
}
stored.SSLPrivateKeyPath = persistControlledSSLPath(stored.SSLPrivateKeyPath)
stored.SSLPublicKeyPath = persistControlledSSLPath(stored.SSLPublicKeyPath)
data, err := json.Marshal(stored)
data, err := json.MarshalIndent(stored, "", " ")
if err != nil {
return errors.Wrap(err)
}
@@ -341,7 +341,7 @@ func readConfig() (*Config, error) {
}
cfgData, err := readConfigFile("config.json")
if os.IsNotExist(err) {
data, marshalErr := json.Marshal(configData)
data, marshalErr := json.MarshalIndent(configData, "", " ")
if marshalErr != nil {
return nil, errors.Wrap(marshalErr)
}