Skip to content

Instantly share code, notes, and snippets.

@filipearray
Last active May 11, 2024 01:59
Show Gist options
  • Save filipearray/5f546faf3d18e1a45ef436b420946faf to your computer and use it in GitHub Desktop.
Save filipearray/5f546faf3d18e1a45ef436b420946faf to your computer and use it in GitHub Desktop.
Weather Forecast
// Package weather shows the current condition of the place you want to know about.
package weather
// CurrentCondition variable shows the current condition of the place you want to know about.
var CurrentCondition string
// CurrentLocation variable gets the place you want to know about.
var CurrentLocation string
// Forecast function is responsible for gathering the current condition information of the place you want to know about.
func Forecast(city, condition string) string {
CurrentLocation, CurrentCondition = city, condition
return CurrentLocation + " - current weather condition: " + CurrentCondition
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment