From 9a11d69d63f9fe7341f6d3fe36c373ca316cc5c5 Mon Sep 17 00:00:00 2001 From: Puqns67 Date: Sat, 23 Nov 2024 18:37:26 +0800 Subject: [PATCH] Update indent rules Remove indents in the server response configuration and change spaces to tabs in the "export" command output. --- cmd/serenity/cmd_export.go | 2 +- server/server_render.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/serenity/cmd_export.go b/cmd/serenity/cmd_export.go index d8fa50b..83afe66 100644 --- a/cmd/serenity/cmd_export.go +++ b/cmd/serenity/cmd_export.go @@ -105,7 +105,7 @@ func export(profileName string) error { return err } encoder := json.NewEncoderContext(globalCtx, os.Stdout) - encoder.SetIndent("", " ") + encoder.SetIndent("", " ") err = encoder.Encode(boxOptions) if err != nil { return E.Cause(err, "encode config") diff --git a/server/server_render.go b/server/server_render.go index 6501980..8d31af4 100644 --- a/server/server_render.go +++ b/server/server_render.go @@ -84,7 +84,7 @@ func (s *Server) render(writer http.ResponseWriter, request *http.Request) { } var buffer bytes.Buffer encoder := json.NewEncoderContext(s.ctx, &buffer) - encoder.SetIndent("", " ") + encoder.SetIndent("", "") err = encoder.Encode(&options) if err != nil { s.logger.Error(E.Cause(err, "marshal options"))