From ce5102caf76e74d0252a62d6b2f4fc56aaaa3936 Mon Sep 17 00:00:00 2001 From: gutmet Date: Wed, 5 Apr 2023 22:39:42 +0200 Subject: [PATCH] change Latitude and Longitude to shorter names --- ReverseGeoLookup.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ReverseGeoLookup.go b/ReverseGeoLookup.go index 3f5bf48..30765f6 100644 --- a/ReverseGeoLookup.go +++ b/ReverseGeoLookup.go @@ -20,8 +20,8 @@ const ( ) type Location struct { - Latitude float64 - Longitude float64 + Lat float64 + Lon float64 } type Address struct { @@ -35,14 +35,14 @@ func (l *Location) values() (float64, float64) { if l == nil { return 0, 0 } - return l.Latitude, l.Longitude + return l.Lat, l.Lon } func (l *Location) isEmpty() bool { if l == nil { return true } - return l.Latitude == 0 || l.Longitude == 0 + return l.Lat == 0 || l.Lon == 0 } var knownAddresses map[string]Address @@ -79,7 +79,7 @@ func (l *Location) String() string { if l == nil { return "" } - return fmt.Sprintf("%v, %v", l.Latitude, l.Longitude) + return fmt.Sprintf("%v, %v", l.Lat, l.Lon) } func fetchAddresses(locations []Location) map[Location]Address {