diff --git a/cmd/client/location.go b/cmd/client/location.go index c1c670b..bee23a0 100644 --- a/cmd/client/location.go +++ b/cmd/client/location.go @@ -11,6 +11,7 @@ import ( "strings" ) +// Use WAN address to obtain location data func getLocation(app *application) { res, err := http.Get("https://ipinfo.io/json") @@ -35,6 +36,7 @@ func getLocation(app *application) { app.Config.Latitude, app.Config.Longitude = loc[0], loc[1] } +// Prompt user for location func getPreciseLocation(app *application) { fmt.Print("\nEnter latitude: ") diff --git a/cmd/client/weather.go b/cmd/client/weather.go index fdba3a1..8e9dab4 100644 --- a/cmd/client/weather.go +++ b/cmd/client/weather.go @@ -7,6 +7,7 @@ import ( "net/http" ) +// Get and store the current forecast func getCurrent(app *application) { lat := "lat=" + app.Config.Latitude