There is no way to compare x509.CertPools now that it has an unexpected function field. This comparison is as close as we can get. See https://github.com/golang/go/issues/26614 for a related issue.