Added comments

This commit is contained in:
Andrew Scott 2022-07-26 22:22:05 -04:00
parent 91eb2a5aa1
commit 35748b2233
Signed by: a
GPG key ID: 3EB62D0BBB8DB381
2 changed files with 3 additions and 0 deletions

View file

@ -11,6 +11,7 @@ import (
"strings" "strings"
) )
// Use WAN address to obtain location data
func getLocation(app *application) { func getLocation(app *application) {
res, err := http.Get("https://ipinfo.io/json") 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] app.Config.Latitude, app.Config.Longitude = loc[0], loc[1]
} }
// Prompt user for location
func getPreciseLocation(app *application) { func getPreciseLocation(app *application) {
fmt.Print("\nEnter latitude: ") fmt.Print("\nEnter latitude: ")

View file

@ -7,6 +7,7 @@ import (
"net/http" "net/http"
) )
// Get and store the current forecast
func getCurrent(app *application) { func getCurrent(app *application) {
lat := "lat=" + app.Config.Latitude lat := "lat=" + app.Config.Latitude