isWildcardOrDefault determines if the subjects include any wildcard domains, or is the "default" policy (i.e. no subjects) which is unbounded.
()
| 463 | // isWildcardOrDefault determines if the subjects include any wildcard domains, |
| 464 | // or is the "default" policy (i.e. no subjects) which is unbounded. |
| 465 | func (ap *AutomationPolicy) isWildcardOrDefault() bool { |
| 466 | isWildcardOrDefault := len(ap.subjects) == 0 |
| 467 | |
| 468 | for _, sub := range ap.subjects { |
| 469 | if strings.HasPrefix(sub, "*") { |
| 470 | isWildcardOrDefault = true |
| 471 | break |
| 472 | } |
| 473 | } |
| 474 | return isWildcardOrDefault |
| 475 | } |
| 476 | |
| 477 | // DefaultIssuers returns empty Issuers (not provisioned) to be used as defaults. |
| 478 | // This function is experimental and has no compatibility promises. |
no outgoing calls
no test coverage detected