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
HasCertificate returns a certificate by value along with a boolean to denote if the certificate was returned. A proposed simplification of this interface would be to change it to Certificate() (*x509.Certificate), which has two benefits: Passing by pointer over copy to avoid copying potentially large certificates, and removing the need to return a boolean when you can simply check if the return value is not nil.
One question for the original implementers: Was this function named to mirror the other function that returns an interface and boolean, since we can't return an interface by pointer?
The text was updated successfully, but these errors were encountered:
One question for the original implementers: Was this function named to mirror the other function that returns an interface and boolean, since we can't return an interface by pointer?
I think so, along with things like HasInclusionPromise() and HasInclusionProof() where we just return a bool. But I don't think we depend on this naming / consistency, and this proposed change sound fine to me.
Description
HasCertificate
returns a certificate by value along with a boolean to denote if the certificate was returned. A proposed simplification of this interface would be to change it toCertificate() (*x509.Certificate)
, which has two benefits: Passing by pointer over copy to avoid copying potentially large certificates, and removing the need to return a boolean when you can simply check if the return value is not nil.One question for the original implementers: Was this function named to mirror the other function that returns an interface and boolean, since we can't return an interface by pointer?
The text was updated successfully, but these errors were encountered: