change Latitude and Longitude to shorter names
This commit is contained in:
parent
1d6f312c1b
commit
ce5102caf7
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user