func getRevocationResultReason()

in internal/verifier/verifier.go [238:262]


func getRevocationResultReason(revokedEntities []string) string {
	var resources string
	var certRevoked bool
	for _, resource := range revokedEntities {
		if strings.HasPrefix(resource, "arn") {
			if resources == "" {
				resources += resource
			} else {
				resources = resources + ", " + resource
			}
		} else {
			certRevoked = true
		}
	}

	var reason string
	if resources != "" {
		reason = fmt.Sprintf(reasonRevokedResourceFmt, resources)
	}
	if certRevoked {
		reason += reasonRevokedCertificate
	}

	return reason
}