geonames

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 6 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")

ErrNotFound is returned when no result is 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