Skip to content

Commit

Permalink
style(cache): save data in indented json
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisin0 committed Sep 16, 2024
1 parent 9b99194 commit 55ee2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (c *Cache) Save(id string, data interface{}) error {
// Serialize the data to JSON
filePath := filepath.Join(c.directory, id+".json")

jsonData, err := json.Marshal(cacheData)
jsonData, err := json.MarshalIndent(cacheData, "", " ")
if err != nil {
return fmt.Errorf("failed to serialize data: %v", err)
}
Expand Down

0 comments on commit 55ee2c9

Please sign in to comment.