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..2b1ccf1 --- /dev/null +++ b/solutions/go/weather-forecast/1/weather_forecast.go @@ -0,0 +1,16 @@ +// Package weather is a program that can forecast +// the current weather condition of various cities in Goblinocus. +package weather + +var ( + // CurrentCondition states the current condition of the weather. + CurrentCondition string + // CurrentLocation states the current location where the condition exist. + CurrentLocation string +) + +// Forecast() displays the CurrentLocation and the CurrentCondtion of the weather. +func Forecast(city, condition string) string { + CurrentLocation, CurrentCondition = city, condition + return CurrentLocation + " - current weather condition: " + CurrentCondition +}