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

Method LoadModel

model/model.go:163–170  ·  view source on GitHub ↗

LoadModel loads the model from model CONF file.

(path string)

Source from the content-addressed store, hash-verified

161
162// LoadModel loads the model from model CONF file.
163func (model Model) LoadModel(path string) error {
164 cfg, err := config.NewConfig(path)
165 if err != nil {
166 return err
167 }
168
169 return model.loadModelFromConfig(cfg)
170}
171
172// LoadModelFromText loads the model from the text.
173func (model Model) LoadModelFromText(text string) error {

Callers 1

NewModelFromFileFunction · 0.95

Calls 2

loadModelFromConfigMethod · 0.95
NewConfigFunction · 0.92

Tested by

no test coverage detected