Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*byzip should not use int as datatype #88

Open
dragonchaser opened this issue Feb 2, 2021 · 1 comment
Open

*byzip should not use int as datatype #88

dragonchaser opened this issue Feb 2, 2021 · 1 comment

Comments

@dragonchaser
Copy link

dragonchaser commented Feb 2, 2021

The ByZip functions require an int as argument, this is an issue with German zip codes since they can start with a 0, for example Chemnitz (Saxony) has the zip acode 09123

Examples of functions affected:

  • func (w *CurrentWeatherData) CurrentByZip(zip int, countryCode string) error (current.go)
  • func (f *ForecastWeatherData) DailyByZip(zip int, countryCode string, days int) (forecast.go)

I suggest passing this as string

@donatj
Copy link
Contributor

donatj commented Feb 4, 2021

United States zip codes can start with a 0 as well. I came here to open an issue, but you beat me to it by two days.

Zip codes around Atlantic City for instance:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants