fix: abnormal indent in summary.json

This commit is contained in:
lilong.129
2025-06-07 20:45:35 +08:00
parent e75edf8400
commit fcf3009c67
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -41,9 +41,9 @@ func Dump2JSON(data interface{}, path string) error {
} }
log.Info().Str("path", path).Msg("dump data to json") log.Info().Str("path", path).Msg("dump data to json")
// init json encoder // Use standard library json encoder with consistent indentation and no HTML escaping
buffer := new(bytes.Buffer) buffer := new(bytes.Buffer)
encoder := json.NewEncoder(buffer) encoder := builtinJSON.NewEncoder(buffer)
encoder.SetEscapeHTML(false) encoder.SetEscapeHTML(false)
encoder.SetIndent("", " ") encoder.SetIndent("", " ")
+1 -1
View File
@@ -1 +1 @@
v5.0.0-beta-2506071652 v5.0.0-beta-2506072045