15 lines
457 B
Go
15 lines
457 B
Go
|
// Package weather return forecast (weather condition) for location.
|
||
|
package weather
|
||
|
|
||
|
// CurrentCondition is Weather Condition.
|
||
|
var CurrentCondition string
|
||
|
|
||
|
// CurrentLocation is Location.
|
||
|
var CurrentLocation string
|
||
|
|
||
|
// Forecast is function to generate sentence with forecast.
|
||
|
func Forecast(city, condition string) string {
|
||
|
CurrentLocation, CurrentCondition = city, condition
|
||
|
return CurrentLocation + " - current weather condition: " + CurrentCondition
|
||
|
}
|