diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-17 20:33:18 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-17 20:33:18 +0900 |
| commit | 7e69893264f4b3ee3fc9168a61908552f7fbddac (patch) | |
| tree | e1fb3bcb000156a2ed80928a9697373d0142aa0c /acl/perms.go | |
| parent | 38a3e6af03e638f82f72e5659588eaf17c78aafa (diff) | |
acl: rename UpdatePerms to Update
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'acl/perms.go')
| -rw-r--r-- | acl/perms.go | 18 |
1 files changed, 18 insertions, 0 deletions
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) +} |
