Skip to content

Commit

Permalink
fix: Use empty string slice as initial encoding for the json db
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmlft committed Oct 19, 2024
1 parent 211f804 commit 67ce3ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion todo-go/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func InitialiseDB(path string) error {
b, err := json.Marshal("[]")
encoding, err := json.Marshal([]string{})
if err != nil {
return err
}
Expand Down

0 comments on commit 67ce3ce

Please sign in to comment.