This service responds to requests to calculate the straight-line distance between two sets of coordinates.
##Dependencies
- MySQL
In your project directory, you can run
go get github.com/dmonay/worth_my_salt
To run tests, run
go test
To run benchmarks, run
go test -check.b
POST /distance
Sample Request Body
{
"lat1":"39.768434",
"lon1":"-104.901872",
"lat2":"44.7793732",
"lon2":"-69.6734886",
"unit":"km"
}
NOTE: Units MUST be one of "mi", "miles", "km", or "kilometers".
Sample Response Body
{
"Success":"You have 2927.7229366372153 km to travel."
}