A bit of a newcomer to Go, and I'm effectively receiving a small (~1KB) JSON file from an API repeatedly that is effectively a log, and I want to keep each one of these files.
I'm thinking just storing each JSON block as a unique file (in lieu of using a database, which seems unnecessary) in a specific directory.
First off, is this an okay idea? There could be potentially a few hundred per day.
More importantly, how do I ensure uniqueness across filenames? Obviously I can't just save each one as log.json
and call it a day, as there would be conflicts. How would I ensure uniqueness?