code: func CalculateCertFingerprint(pemValue string) (string, error) {
  	// The _ result below is not an error but the remaining PEM bytes.
  	block, _ := pem.Decode([]byte(pemValue))
  	if block == nil {
  		return "", fmt.Errorf("no PEM-encoded data found")
  	}
  
  	if block.Type != "CERTIFICATE" {
  		return "", fmt.Errorf("first PEM-block should be CERTIFICATE type")
  	}
  
  	hash := sha1.Sum(block.Bytes)
  	return HexString(hash[:]), nil
  }
docs: // CalculateCertFingerprint parses the x509 certificate from a PEM-encoded value
  // and calculates the SHA-1 fingerprint.