MCPcopy Index your code
hub / github.com/apache/casbin / GetEvalValue

Function GetEvalValue

util/util.go:270–277  ·  view source on GitHub ↗

GetEvalValue returns the parameters of function eval.

(s string)

Source from the content-addressed store, hash-verified

268
269// GetEvalValue returns the parameters of function eval.
270func GetEvalValue(s string) []string {
271 subMatch := evalReg.FindAllStringSubmatch(s, -1)
272 var rules []string
273 for _, rule := range subMatch {
274 rules = append(rules, rule[1])
275 }
276 return rules
277}
278
279// EscapeStringLiterals escapes backslashes in string literals within an expression
280// to ensure consistent handling between govaluate (which interprets escape sequences)

Callers 1

testGetEvalValueFunction · 0.85

Calls

no outgoing calls

Tested by 1

testGetEvalValueFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…