A Go Microservice to return the nearest address for latitude and longitude.
Input must have 2 arguments:
- Latitude
- Longitude
Input:
go run main.go 33.1056113 -86.8459558
Output (Success):
{"error":"","address":"514 Hidden Valley Dr"}
Output (Failure):
{
"error":"<error message>",
"state":""
}
Requirements:
- Golang environment set up
- Git
- Boot2docker running
go get github.com/cloudspace/Go_Location_Address
cd <Go_Location_Address Directory>
docker run --rm -v $(pwd):/src centurylink/golang-builder
In order for the golang-builder to work, you need to have the github url on the top line of main.go. It should look like this:
package main // import "github.com/cloudspace/Go_Location_Address"
A docker image has to be built for each state. Follow the instructions here: Generate Docker Images - Instructions