14 lines
530 B
Go
14 lines
530 B
Go
// Package weather provides tools to help in weather forecast.
|
|
package weather
|
|
|
|
// CurrentCondition represents the current weather condition.
|
|
var CurrentCondition string
|
|
// CurrentLocation represents the current location to get weather information.
|
|
var CurrentLocation string
|
|
|
|
// Forecast returns information about the weather in the given location.
|
|
func Forecast(city, condition string) string {
|
|
CurrentLocation, CurrentCondition = city, condition
|
|
return CurrentLocation + " - current weather condition: " + CurrentCondition
|
|
}
|