code: func (s *Server) Certificate() *x509.Certificate {
  	// By default httptest.StartTLS uses http/internal.LocalhostCert, which we can access here:
  	cert, _ := x509.ParseCertificate(s.TLS.Certificates[0].Certificate[0])
  	return cert
  }
docs: // Certificate returns the TLS certificate for the Server if started with TLS enabled.
  // This method will panic if TLS is not enabled for the server.