Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmd/flightsd
etc
vendor
.gitignore
Dockerfile
Dockerfile.flightsd
LICENSE
Makefile
README.md
circle.yml
flights.go
handler.go

README.md

CircleCI Go Report Card GoDoc MIT License

Flights is a super-simple mileage calculator using the data from OpenFlights.

It serves three components:

  • The main mileage calculator, hosted at / on the http port, which is just a dead simple html page
  • The HTTP API from go.pedge.io/openflights, hosted at /api on the http port
  • The GRPC API from go.pedge.io/openflights, hosted at / on the grpc port

By default, the http port is 8080 (mapped to 80 at flights.pedge.io and mileage.tools), and the grpc port is 7070.

Routes are inputted using freeform strings, as shown by example on the calculator page. Minimum miles and percentage are both integers (100 = 100%).

The primary purpose of this repository has been to test out various libraries I write. Also, I've been a backend guy my whole career, so this has been a way for me to play around with some simple html/javascript/css.

It is hard to find a good, simple mileage calculator, and if you fly a lot, a few miles here and there at the end of the year can make a big difference. I have wanted a good, simple mileage calculator for a while - no bells and whistles, just calculate what I want and be done with it - so I decided to write one.

Next steps are overrides for various airlines. (i.e. United). If you fly a lot, you know that the actual distance in miles is not the only factor in how many award and premier miles you earn. go.pedge.io/ualmiles is part of the work in progress for this, but I have no idea when I will have time to finish it.

As with the openflights repository, if you do use this, I ask you to donate to OpenFlights, the source for all the data in here as of now, at http://openflights.org/donate. Seriously, if you can afford it, the OpenFlights team is responsible for putting all this data together and maintaining it, and we owe it to them to support their work.