disgoorg / disgo

A modular Golang Discord API Wrapper
Apache License 2.0
333 stars 37 forks source link

remove: `disgo.OS` #366

Closed Malix-Labs closed 3 months ago

Malix-Labs commented 3 months ago

References

topi314 commented 3 months ago

What is the reason for this change?

Malix-Labs commented 3 months ago

runtime.GOOS already output the desired output from disgo.getOS() while making it even more portable

See updated https://github.com/disgoorg/disgo/pull/366#issue-2370847615#references

Malix-Labs commented 3 months ago

Also, disgo.OS will also become redundant with runtime.GOOS

topi314 commented 3 months ago

while I can't exactly tell you why this was introduced in the first place since it's been over 2y lol, it was prob to make it easily overwritable, the structure has been quite different back then and this seems to has stuck with us since.

These days you can overwrite this differently so it's prob fine to get completely rid off the const & replace it with runtime.GOOS in https://github.com/disgoorg/disgo/blob/master/disgo.go#L108

Malix-Labs commented 3 months ago

Done

topi314 commented 3 months ago

thanks