14 lines
567 B
Go
14 lines
567 B
Go
// Package weather contains functions for forecasting the weather at a given location.
|
|
package weather
|
|
|
|
// CurrentCondition stores the current weather condition.
|
|
var CurrentCondition string
|
|
// CurrentLocation stores the current location for the weather forecast.
|
|
var CurrentLocation string
|
|
|
|
// Forecast takes a city and location as an argument and returns the current weather condition.
|
|
func Forecast(city, condition string) string {
|
|
CurrentLocation, CurrentCondition = city, condition
|
|
return CurrentLocation + " - current weather condition: " + CurrentCondition
|
|
}
|