Write "\n" to end of jsons

This commit is contained in:
Paper Mountain Studio 2019-03-30 19:17:37 +01:00
parent f328a97d7c
commit 40263ff682
1 changed files with 3 additions and 0 deletions

View File

@ -114,6 +114,9 @@ func (d *Driver) Write(collection, resource string, v interface{}) error {
return err
}
// add newline to the end
b = append(b, byte('\n'))
// write marshaled data to the temp file
if err := ioutil.WriteFile(tmpPath, b, 0644); err != nil {
return err