code: func ParseCertificateDomain(domain string) (cert *Certificate, err error) {
  	var host, port string
  	if host, port, err = net.SplitHostPort(domain); err != nil {
  		host = domain
  		port = "443"
  	}
  
  	var conn *tls.Conn
  	conn, err = tls.DialWithDialer(&net.Dialer{Timeout: 10 * time.Second}, "tcp", net.JoinHostPort(host, port), &tls.Config{InsecureSkipVerify: true})
  	if err != nil {
  		return
  	}
  	defer conn.Close()
  
  	if len(conn.ConnectionState().PeerCertificates) == 0 {
  		return nil, errors.New("received no server certificates")
  	}
  
  	cert = ParseCertificate(conn.ConnectionState().PeerCertificates[0])
  	return
  }
docs: // ParseCertificateDomain parses the certificate served by the given domain.