diff --git a/cmd/client/advanced.go b/cmd/client/advanced.go index 8a7cb85..809be74 100644 --- a/cmd/client/advanced.go +++ b/cmd/client/advanced.go @@ -37,8 +37,20 @@ func advancedMenu(app *application) { } fmt.Printf("\nChanged units from %s to %s...\n\n", current, app.Config.Units) } else if option == "2" { - getPreciseLocation(app) - getCurrent(app) + + var validLoc bool + for !validLoc { + getPreciseLocation(app) + getCurrent(app) + + if app.Forecast.Main.Temp != 0.00 { + validLoc = true + } else { + fmt.Println("I couldn't get any information for that location.") + fmt.Println("Are you sure the coordinates are valid?") + } + } + printWeather(app) } }