GithubHelp home page GithubHelp logo

auctioneer's Introduction

auctioneer

About

Auctioneer is simple auto-auction system developed in Go.

Table Of Contents

How it works?

An auctioneer instance is needed to be created and configured.

For now the only configuration needed is the maxRounds that the auction will perform.

a := auctioneer.NewAuctioneer(auctioneer.WithMaxRounds(99))

Then, a slice of bidder type instances is needed. These are the params for the creation:

auctioneer.NewBidder(auctioneer.BidderParams{
    Name:       "funky name",
    InitialBid: 2500,
    MaxBid:     3500,
    Increment:  250,
})

[!NOTE] Next version will support a currency type, to avoid using float64.

With the participants generated, what's left to do, is perform the auction and get the winner:

winner, err := a.Auction(bidders)

Pre-requisites

The program runs using only the standard library of Go. So the only pre-requisite is to have installed the Go language.

The project in particular uses:

  • Go 1.22.2 >=

Running the project

You can build and run the project manually with the go tool and commands. The preferred way is using either the provided Makefile or Docker.

Installed locally

# builds the binary and run the program.
make run-go

There are some other useful commands like

# runs the unit tests of the project.
make run-test

# runs the tests too, and generate the cover file ands open it in the brower.
make open-cover 

Dockerized

If you don't have Go installed and preferred only to use Docker, there are some make targets too.

# ensures docker is installed and builds the image.
make build-docker

# runs the previously generated docker image and remove the container after.
make run-docker

auctioneer's People

Contributors

avelinoschz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.