nchaloult / apt-grocery

A GroupMe bot that manages an apartment-wide grocery list
1 stars 2 forks source link

Store prices for commonly-purchased items #9

Closed nchaloult closed 5 years ago

nchaloult commented 5 years ago

Fleshed out storage.go so that it can be used to interface with the new prices.go. Wrote some "first-draft" tests, too. Let me know if you'd like to do anything differently; this may not be the best way to implement this feature.

These changes don't support deleting or clearing prices. I figured we'd never really want to do that. You can overwrite an existing item's stored price, though, which I figured we might do sometimes. If you want there to be a way to remove specific stored prices, I'll leave that as an exercise to @hgermundsen :)

P.S: Squash all commits on this branch & delete the source branch when merging, please