What version of Go are you using (go version)?
go 1.16.x
What did you expect to see?
In response to #45891, x509.CertPool structs can no longer be compared with reflect.DeepEqual, and there is no way to export the certificates, so there is no longer any way to fully compare these structs.
CertPool.Subjects can be used for a shallow comparison, but #45891 (comment) shows that this is not a complete comparison.
By adding an Equal(other CertPool) bool these types can be compared directly, and go-cmp will automatically use the method for comparison.
What version of Go are you using (
go version)?go 1.16.x
What did you expect to see?
In response to #45891,
x509.CertPoolstructs can no longer be compared withreflect.DeepEqual, and there is no way to export the certificates, so there is no longer any way to fully compare these structs.CertPool.Subjectscan be used for a shallow comparison, but #45891 (comment) shows that this is not a complete comparison.By adding an
Equal(other CertPool) boolthese types can be compared directly, and go-cmp will automatically use the method for comparison.