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

Function loadAssertion

model/model.go:52–55  ·  view source on GitHub ↗
(model Model, cfg config.ConfigInterface, sec string, key string)

Source from the content-addressed store, hash-verified

50var requiredSections = []string{"r", "p", "e", "m"}
51
52func loadAssertion(model Model, cfg config.ConfigInterface, sec string, key string) bool {
53 value := cfg.String(sectionNameMap[sec] + "::" + key)
54 return model.AddDef(sec, key, value)
55}
56
57var paramsRegex = regexp.MustCompile(`\((.*?)\)`)
58

Callers 1

loadSectionFunction · 0.85

Calls 2

AddDefMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…