Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions solutions/go/weather-forecast/1/weather_forecast.go
Original file line number Diff line number Diff line change
@@ -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
}