package main import ( "fmt" "io" "net/http" ) // Prints the current forecast for a region in standard output // Required arguments: region // Optional arguments: format func ShowForecast(region string, format string, lang string) { query := "https://wttr.in/" + region + "?" + format + "&lang" + lang resp, err := http.Get(query) sanityCheck(err) defer resp.Body.Close() body, err := io.ReadAll(resp.Body) sanityCheck(err) fmt.Printf("%s", body) }