func Geocoder(k string, z int, baseURLs ...string) geo.Geocoder {
	key = k
	var url string
	if len(baseURLs) > 0 {
		url = baseURLs[0]
	} else {
		url = defaultURL
	}
	if z > minZoom && z <= maxZoom {
		zoom = z
	} else {
		zoom = defaultZoom
	}
	return geo.HTTPGeocoder{
		EndpointBuilder:       baseURL(url),
		ResponseParserFactory: func() geo.ResponseParser { return &geocodeResponse{} },
	}
}
Geocoder constructs LocationIQ geocoder
package locationiq
import (
	"fmt"
	"strings"
	"github.com/codingsince1985/geo-golang"
	"github.com/codingsince1985/geo-golang/osm"
)
type baseURL string
type geocodeResponse struct {
	DisplayName     string `json:"display_name"`
	Lat, Lon, Error string
	Addr            osm.Address `json:"address"`
}
const (
	defaultURL  = "http://locationiq.org/v1/"
	minZoom     = 0   
	maxZoom     = 18  
	defaultZoom = 18
)
var (
	key  string
	zoom int
)