code: func CompareChainExpiry(chain1, chain2 []*x509.Certificate) int {
  	t1 := helpers.ExpiryTime(chain1)
  	t2 := helpers.ExpiryTime(chain2)
  	return compareTime(t1, t2)
  }
docs: // CompareChainExpiry ranks chain that lasts longer higher.