package weather import ( "context" "errors" ) var ErrNotConfigured = errors.New("weather: not configured") type Weather struct { Location string `json:"location"` Temperature float64 `json:"temperature"` Condition string `json:"condition"` } type Provider interface { CurrentWeather(ctx context.Context, location string) (Weather, error) } type StubProvider struct{} func NewStubProvider() *StubProvider { return &StubProvider{} } func (s *StubProvider) CurrentWeather(_ context.Context, location string) (Weather, error) { return Weather{}, ErrNotConfigured }