add newline to end of JSON files
s-ol
5 months ago
187 | 187 |
|
188 | 188 |
id, key := meta["id"].(string), meta["key"].(string)
|
189 | 189 |
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'),
|
192 | 192 |
0644,
|
193 | 193 |
); err != nil {
|
194 | 194 |
return err
|