ywwg / packingdb

A thing that helps me figure out what to pack.
GNU General Public License v3.0
0 stars 1 forks source link

Add packing list for burn night dinner #4

Closed sarina closed 7 years ago

sarina commented 7 years ago

@ywwg it's important that you don't forget this

i'm new to go so feel free to give me comments to fix things around!

sarina commented 7 years ago

I thought of this when I woke up - I need advice on how to handle the "rate" parameter on the structs, because these are consumables but actually kind of not consumed at a rate, they'll (ideally) all go at once.

ywwg commented 7 years ago

Then you want a CustomConsumableItem! I did this for gasoline. It lets you pass an inline calculation function for your rate calculation, taking the number of days as a parameter.

ywwg commented 7 years ago

Oh haha I probably shouldn't have merged, it's telling me to bring "34 pounds of pulled pork". "The tests will come in a later PR"

sarina commented 7 years ago

lol I can make a new PR with revised changes, no worries. I am sitting next to a former Googler who is excited to get me set up with a Go env

ywwg commented 7 years ago

sorry I fixed it already but Patches Welcome if you come up with something better than the gross thing I did

ywwg commented 7 years ago

(a new type for one-time consumables seems reasonable)