From 578a925e4fddaac9dfb366208f44057560c39afb Mon Sep 17 00:00:00 2001 From: "exercism-solutions-syncer[bot]" <211797793+exercism-solutions-syncer[bot]@users.noreply.github.com> Date: Sat, 21 Feb 2026 19:50:44 +0000 Subject: [PATCH] [Sync Iteration] go/weather-forecast/1 --- .../go/weather-forecast/1/weather_forecast.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 solutions/go/weather-forecast/1/weather_forecast.go 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..920d687 --- /dev/null +++ b/solutions/go/weather-forecast/1/weather_forecast.go @@ -0,0 +1,17 @@ +// Package weather provides information about current weather conditions and forecasts. +package weather + +var ( + // CurrentCondition Stores the current weather condition. + CurrentCondition string + // CurrentLocation Stores the current location. + CurrentLocation string +) + +// Forecast generates a weather forecast string based on the provided city and condition. +// It updates the CurrentLocation and CurrentCondition variables with the input values, +// then returns a formatted string indicating the location and current weather. +func Forecast(city, condition string) string { + CurrentLocation, CurrentCondition = city, condition + return CurrentLocation + " - current weather condition: " + CurrentCondition +}