exercism/go/weather-forecast/weather_forecast.go

15 lines
457 B
Go
Raw Permalink Normal View History

2024-11-12 16:29:15 +00:00
// 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
}