Implement review suggestions

This commit is contained in:
Daniel
2021-09-27 12:52:36 +02:00
parent 7a04eea8e6
commit 48e9a35a07
6 changed files with 20 additions and 21 deletions

View File

@@ -112,14 +112,10 @@ func (dl *DeviceLocation) IsMoreAccurateThan(other *DeviceLocation) bool {
}
func (dl *DeviceLocation) LocationOrNil() *geoip.Location {
switch {
case dl == nil:
if dl == nil {
return nil
case dl.Location == nil:
return nil
default:
return dl.Location
}
return dl.Location
}
func (dl *DeviceLocation) String() string {