Skip to content

Commit

Permalink
go/common/entity: Use pretty-printed JSON when saving entity to file
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanez committed Sep 22, 2021
1 parent 240676f commit 84712b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changelog/4266.feature.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/common/entity: Use pretty-printed JSON when saving entity to file
2 changes: 1 addition & 1 deletion go/common/entity/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (e *Entity) Save(baseDir string) error {
entityPath := filepath.Join(baseDir, entityFilename)

// Write to disk.
b, err := json.Marshal(e)
b, err := json.MarshalIndent(e, "", " ")
if err != nil {
return err
}
Expand Down

0 comments on commit 84712b1

Please sign in to comment.