From 40263ff6820df75b4989fdbfe839b850bfc31440 Mon Sep 17 00:00:00 2001 From: Paper Mountain Studio Date: Sat, 30 Mar 2019 19:17:37 +0100 Subject: [PATCH 1/3] Write "\n" to end of jsons --- scribble.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scribble.go b/scribble.go index 65844ce..d3e50ea 100644 --- a/scribble.go +++ b/scribble.go @@ -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 From 57feb66e3cc1d0bcd4f6e4ed50d9604e814e8382 Mon Sep 17 00:00:00 2001 From: Paper Mountain Studio Date: Sat, 30 Mar 2019 19:46:09 +0100 Subject: [PATCH 2/3] Correct import --- example/fishing.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example/fishing.go b/example/fishing.go index 302df2d..f6fcaef 100644 --- a/example/fishing.go +++ b/example/fishing.go @@ -3,8 +3,7 @@ package main import ( "encoding/json" "fmt" - - scribble "github.com/nanobox-io/golang-scribble" + "github.com/sdomino/scribble" ) // a fish From 8ec5ab2cfff2b8e598c5a3173adc48c9564e8629 Mon Sep 17 00:00:00 2001 From: Paper Mountain Studio Date: Sat, 30 Mar 2019 19:46:41 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a321056..cc10cf7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A tiny JSON database in Golang ### Installation -Install using `go get github.com/nanobox-io/golang-scribble`. +Install using `go get github.com/sdomino/scribble`. ### Usage