forked from security/hakurei
These packages are highly specific to hakurei and are difficult to use safely from other pieces of code. Their exported symbols are made available until v0.4.0 where they will be removed for #24. Signed-off-by: Ophestra <cat@gensokyo.uk>
19 lines
238 B
Go
19 lines
238 B
Go
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)
|
|
}
|