geonames

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package geonames implements geonames.org APIs.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func Timezone

func Timezone(username string, latitude, longitude string) (*time.Location, error)

Timezone returns the timezone for latitude and longitude coordinates.

Types

type Location

type Location struct {
	Name      string `json:"name"`
	Country   string `json:"countryName"`
	Latitude  string `json:"lat"`
	Longitude string `json:"lng"`
}

A Location represents a geo location with a few properties.

func Search(username string, q string) (*Location, error)

Search searches a geo name query.

Jump to

Keyboard shortcuts

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