code: func ExpiryTime(chain []*x509.Certificate) (notAfter time.Time) {
  	if len(chain) == 0 {
  		return
  	}
  
  	notAfter = chain[0].NotAfter
  	for _, cert := range chain {
  		if notAfter.After(cert.NotAfter) {
  			notAfter = cert.NotAfter
  		}
  	}
  	return
  }
docs: // ExpiryTime returns the time when the certificate chain is expired.