miles

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 10 Imported by: 0

README

miles

Build Status

Calculate the distance flown for a given itinerary.

Installation

go install github.com/asmarques/miles@latest

Usage

To calculate the distance for a given itinerary, specify the IATA code of each airport along the route as an argument to miles:

$ miles LIS EWR SFO EWR LIS
0: LIS	EWR	3384	miles
1: EWR	SFO	2565	miles
2: SFO	EWR	2565	miles
3: EWR	LIS	3384	miles

	total:	11899	miles

The miles command supports the following options:

  • -d to specify the path to the airport database. If not supplied, the embedded airport database is used instead.
  • -o choose the output format. Available formats are: text (default), json and kml.
  • -v to enable verbose output when using the text output format. Includes additional airport information such as airport name, country, latitute and longitude.

License

MIT

The airport database (airports.csv) is obtained from OurAirports.com which is available in the public domain.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL