code: func CompactString(r rbacv1.PolicyRule) string {
  	formatStringParts := []string{}
  	formatArgs := []interface{}{}
  	if len(r.APIGroups) > 0 {
  		formatStringParts = append(formatStringParts, "APIGroups:%q")
  		formatArgs = append(formatArgs, r.APIGroups)
  	}
  	if len(r.Resources) > 0 {
  		formatStringParts = append(formatStringParts, "Resources:%q")
  		formatArgs = append(formatArgs, r.Resources)
  	}
  	if len(r.NonResourceURLs) > 0 {
  		formatStringParts = append(formatStringParts, "NonResourceURLs:%q")
  		formatArgs = append(formatArgs, r.NonResourceURLs)
  	}
  	if len(r.ResourceNames) > 0 {
  		formatStringParts = append(formatStringParts, "ResourceNames:%q")
  		formatArgs = append(formatArgs, r.ResourceNames)
  	}
  	if len(r.Verbs) > 0 {
  		formatStringParts = append(formatStringParts, "Verbs:%q")
  		formatArgs = append(formatArgs, r.Verbs)
  	}
  	formatString := "{" + strings.Join(formatStringParts, ", ") + "}"
  	return fmt.Sprintf(formatString, formatArgs...)
  }
docs: // CompactString exposes a compact string representation for use in escalation error messages