thlib / go-timezone-local

Get the full name of the local timezone
The Unlicense
14 stars 9 forks source link

some initial modifications #1

Closed FObersteiner closed 3 years ago

FObersteiner commented 3 years ago
FObersteiner commented 3 years ago

Actually, I'm kind of unhappy with the _linux thing (also wasn't aware before that _unix doesn't work). I mean Windows is the special case here, and although I don't use a Mac I don't want to scare those people away. It's ok to have a dedicated file for Windows-specific code. But for other OS, it might be best to have a non-prefixed file that just excludes Windows via build-tag.

What do you think, should I suggest another update? Also, I might refactor the code a bit.

timohuovinen commented 3 years ago

@MrFuppes Feel free to refactor, regarding _linux I will change it back to how it was as it doesn't work on Mac (just tested), I'll keep the _unix name because it makes it clear that it won't work on windows.

timohuovinen commented 3 years ago

@MrFuppes I will also put it into a folder so that the package name becomes idiomatic go https://go.dev/blog/package-names

FObersteiner commented 3 years ago

@timohuovinen that's much better, thanks! When I find the time, I'll make a suggestion for some additions to the Windows-part.