city

package module
v0.0.0-...-5b59386 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

README

citydistant

Calculate the distance between two cities according to latitude and longitude. A simple practice of golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager 城市管理

func NewCityConfig

func NewCityConfig(file string) (c *Manager, err error)

NewCityConfig 读取坐标配置,创建管理器

func (*Manager) GetDistance

func (c *Manager) GetDistance(city1 string, city2 string) (dist float64, err error)

GetDistance 计算两个城市间的距离

Jump to

Keyboard shortcuts

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