MCPcopy Create free account
hub / github.com/cloudwan/gohan / hasMatchingPolicy

Function hasMatchingPolicy

cli/template.go:344–351  ·  view source on GitHub ↗
(action schema.Action, policies []*schema.Policy)

Source from the content-addressed store, hash-verified

342}
343
344func hasMatchingPolicy(action schema.Action, policies []*schema.Policy) bool {
345 for _, policy := range policies {
346 if action.ID == policy.Action {
347 return true
348 }
349 }
350 return false
351}
352
353func canUseAction(action schema.Action, policies []*schema.Policy, url string) bool {
354 for _, policy := range policies {

Callers 1

filterActionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected