diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-23 12:34:16 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-23 12:34:16 +0900 |
| commit | 20195ece478a28b2bc7abc78cd220f900958eb35 (patch) | |
| tree | 8e996029a43c58ddfd15b6be9b5e285effeddbea /internal/system/acl.go | |
| parent | cafed5f23468daf2765655325ebe7d879acdde24 (diff) | |
system: return sys in queueing methods
This enables building an instance in a single statement.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/system/acl.go')
| -rw-r--r-- | internal/system/acl.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/system/acl.go b/internal/system/acl.go index f8f1dc68..efc48842 100644 --- a/internal/system/acl.go +++ b/internal/system/acl.go @@ -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 { |
