Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CensusZipCoords = map[string]GeoCoordinates{}/* 33144 elements not displayed */
CensusZipCoords is a huge list of zip code to coordinate data from the Census Bureau.
Functions ¶
func HarvesineDistance ¶
func HarvesineDistance(coords1, coords2 GeoCoordinates) float64
HarvesineDistance finds the distance in KMs between two points on Earth. Formula converted to golang from https://www.movable-type.co.uk/scripts/latlong.html
Types ¶
type GeoCoordinates ¶
GeoCoordinates represent a latitude and longitude on Earth.
func FindCoordsForPostcode ¶
func FindCoordsForPostcode(zip string) (*GeoCoordinates, error)
FindCoordsForPostcode returns the geocoordinates for a zip code.
type HTTPGetter ¶
HTTPGetter for mocking the HTTP client in tests.
type StringReadCloser ¶
type StringReadCloser struct {
// contains filtered or unexported fields
}
StringReadCloser implements ReadCloser and exposes a reader for strings.
func NewStringReadCloser ¶
func NewStringReadCloser(s string) *StringReadCloser
NewStringReadCloser creates a new, initialized StringReadCloser.
func (*StringReadCloser) Close ¶
func (src *StringReadCloser) Close() error
Close really does nothing except satify the ReadCloser interface.
Click to show internal directories.
Click to hide internal directories.