mirror of
https://codeberg.org/andyscott/weather-cli.git
synced 2024-11-08 05:50:51 -05:00
Added comments
This commit is contained in:
parent
91eb2a5aa1
commit
35748b2233
2 changed files with 3 additions and 0 deletions
|
@ -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: ")
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// Get and store the current forecast
|
||||
func getCurrent(app *application) {
|
||||
|
||||
lat := "lat=" + app.Config.Latitude
|
||||
|
|
Loading…
Reference in a new issue