From 7e69893264f4b3ee3fc9168a61908552f7fbddac Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 17 Feb 2025 20:33:18 +0900 Subject: acl: rename UpdatePerms to Update Signed-off-by: Ophestra --- acl/perms.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 acl/perms.go (limited to 'acl/perms.go') diff --git a/acl/perms.go b/acl/perms.go new file mode 100644 index 00000000..fbc99e82 --- /dev/null +++ b/acl/perms.go @@ -0,0 +1,18 @@ +package acl + +type Perms []Perm + +func (ps Perms) String() string { + var s = []byte("---") + for _, p := range ps { + switch p { + case Read: + s[0] = 'r' + case Write: + s[1] = 'w' + case Execute: + s[2] = 'x' + } + } + return string(s) +} -- cgit v1.3.1