diff --git a/solutions/go/weather-forecast/1/weather_forecast.go b/solutions/go/weather-forecast/1/weather_forecast.go new file mode 100644 index 0000000..4f8e7d4 --- /dev/null +++ b/solutions/go/weather-forecast/1/weather_forecast.go @@ -0,0 +1,14 @@ +//Package weather provides function for solving weather forcast problems. +package weather +var ( +// CurrentCondition stores the weather conditon. + CurrentCondition string +// CurrentLocation stores the location where the weather experienced. + CurrentLocation string +) + +// Forecast returns the location and weather of the location in string format. +func Forecast(city, condition string) string { + CurrentLocation, CurrentCondition = city, condition + return CurrentLocation + " - current weather condition: " + CurrentCondition +}