code: func LoadCert(filename string) (cert *x509.Certificate, err error) {
  	certPEM, err := ioutil.ReadFile(filename)
  	if err != nil {
  		return
  	}
  	block, _ := pem.Decode(certPEM)
  	if block == nil {
  		return nil, fmt.Errorf("No data in cert PEM file %s", filename)
  	}
  	cert, err = x509.ParseCertificate(block.Bytes)
  	return
  }
docs: // LoadCert loads a PEM certificate specified by filename or returns an error