Auction(also called a listing in the instructions) contains information and bids on a particular item being sold.
AuctionHouseis a collection of auctions.
Bidis how much a user is prepared to pay for an item in an auction.
Moneyrepresents how much the
reservedPricesis and is a flawed attempt at avoiding floats. In reality we should use a proper third-party package for dealing with Money.
Auctionwith some extra computed fields (like "price paid"). It can be coerced into a string.
Outputis a collection of the
main). This is because I don't think the logic is sufficiently complex yet to warrant breaking the code in to multiple packages.
maincontains the models & some basic IO & actually calls the main functions (
parse.goknows how to read a file & generate the appropriate data model representation.
output.goknows how to generate the appropriate output from an
bid.godeals with bidding (mainly bid verification)
gitif you want to have a look at that.
GO111MODULEenv var to
on(like in the Makefile)
bidmodel, but it would increase complexity (and caching / state management is tricky)