system: return sys in queueing methods
All checks were successful
test / test (push) Successful in 54s
All checks were successful
test / test (push) Successful in 54s
This enables building an instance in a single statement. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
@@ -9,16 +9,20 @@ import (
|
||||
)
|
||||
|
||||
// UpdatePerm appends an ephemeral acl update Op.
|
||||
func (sys *I) UpdatePerm(path string, perms ...acl.Perm) {
|
||||
func (sys *I) UpdatePerm(path string, perms ...acl.Perm) *I {
|
||||
sys.UpdatePermType(Process, path, perms...)
|
||||
|
||||
return sys
|
||||
}
|
||||
|
||||
// UpdatePermType appends an acl update Op.
|
||||
func (sys *I) UpdatePermType(et Enablement, path string, perms ...acl.Perm) {
|
||||
func (sys *I) UpdatePermType(et Enablement, path string, perms ...acl.Perm) *I {
|
||||
sys.lock.Lock()
|
||||
defer sys.lock.Unlock()
|
||||
|
||||
sys.ops = append(sys.ops, &ACL{et, path, perms})
|
||||
|
||||
return sys
|
||||
}
|
||||
|
||||
type ACL struct {
|
||||
|
||||
Reference in New Issue
Block a user