Add 1.22 mux support#570
Conversation
techknowlogick
left a comment
There was a problem hiding this comment.
Thanks for this PR!
One tiny nitpick: I'm hesitant to bring the minimum up to 1.22 as goth is used by many downstreams, some of which still have much lower minimums. Would you be able to add in a polyfill for the new capabilities if the library is being used with a version of go that doesn't support them?
Meta: I do recognize the weirdness of asking for this as it means folks using older versions of go would be upgrading goth but not go (I've long given up on trying to understand some upgrade policies, and if an accommodation can be made without impact to security or significantly increasing maintenance burden, then I do try to at least investigate)
|
@techknowlogick I am open to ideas. I extracted out the |
|
Ok it looks like my change passes the tests; however, I still want to do some individual testing. Also I do not know how I feel about the |
|
maybe splitting into two PRs, one with the removal of ioutl which deprecated since 1.16, and one with the mux introduction which only works >= 1.22. |
|
@techknowlogick I have noticed that this PR has been sitting here a while. To make it more palatable of a merge, would you like me to do as @majst01 mentioned and split this into two smaller PRs. I understand that this is kind of a beefy PR that does has some potential risk with the changes asked. |
|
I have created a companion PR that splits out the |
This PR seems large; however, it fundamentally accomplishes 3 things.
1.22ioutilwith their non-deprecatedioandosalternatives.This this change and without any other modifications, this change breaks backward compatibility for GO <1.22. This can be fixed however by creating a new
gothic.go | gothic_test.gowith//go:build go1.22with these breaking changes. I am happy to make these compatibility changes but would love to get other's opinions first.