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

Method SetFieldIndex

internal_api.go:547–552  ·  view source on GitHub ↗
(ptype string, field string, index int)

Source from the content-addressed store, hash-verified

545}
546
547func (e *Enforcer) SetFieldIndex(ptype string, field string, index int) {
548 assertion := e.model["p"][ptype]
549 assertion.FieldIndexMutex.Lock()
550 assertion.FieldIndexMap[field] = index
551 assertion.FieldIndexMutex.Unlock()
552}

Callers 1

TestCustomizedFieldIndexFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestCustomizedFieldIndexFunction · 0.76