You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For clarity, it would be nice to have funcs like x509.ParsePKIXPublicKey(derBytes []byte) (pub interface{}, err error) and x509.ParsePKCS8PrivateKey(der []byte) (key interface{}, err error) return the named aliases crypto.PublicKey and crypto.PrivateKey rather than just interface{}.
There are other spots in the crypto packages that could probably benefit from this as well. I'm wondering if there's a reason not to do this?
I have a simple patch that updates these APIs with all tests passing that I'd be happy to submit.
The text was updated successfully, but these errors were encountered:
I read that document before submitting which almost prevented me from suggesting this. But it isn't exactly clear to me.
Is it really breaking an API compatibility rule to replace an empty interface return type with an alias to an empty interface? I couldn't see a specific way that this change would break any existing Go programs. But maybe I just wasn't thinking hard enough?
For clarity, it would be nice to have funcs like
x509.ParsePKIXPublicKey(derBytes []byte) (pub interface{}, err error)
andx509.ParsePKCS8PrivateKey(der []byte) (key interface{}, err error)
return the named aliasescrypto.PublicKey
andcrypto.PrivateKey
rather than justinterface{}
.There are other spots in the crypto packages that could probably benefit from this as well. I'm wondering if there's a reason not to do this?
I have a simple patch that updates these APIs with all tests passing that I'd be happy to submit.
The text was updated successfully, but these errors were encountered: