git.s-ol.nu json-hopper / main
add newline to end of JSON files s-ol 11 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
187187
188188 id, key := meta["id"].(string), meta["key"].(string)
189189 if err := os.WriteFile(
190 filepath.Join(h.path, id+".json"),
191 raw_data,
190 filepath.Join(h.path, id + ".json"),
191 append(raw_data, '\n'),
192192 0644,
193193 ); err != nil {
194194 return err