From 5d5bfa7bb25e1a42fb74ddfb95b9c86ee440bb9c Mon Sep 17 00:00:00 2001 From: s-ol Date: Mon, 3 Oct 2022 21:27:21 +0200 Subject: add newline to end of JSON files --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 7e815fb..f846717 100644 --- a/main.go +++ b/main.go @@ -188,8 +188,8 @@ func (h *SiteHandler) handlePOST(w http.ResponseWriter, r *http.Request, meta ma id, key := meta["id"].(string), meta["key"].(string) if err := os.WriteFile( - filepath.Join(h.path, id+".json"), - raw_data, + filepath.Join(h.path, id + ".json"), + append(raw_data, '\n'), 0644, ); err != nil { return err -- cgit v1.2.3