Ophestra Umiker
c8a90666c5
All checks were successful
test / test (push) Successful in 37s
Move all C code to c.go, switch to pkg-config, set up finalizer for acl. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
20 lines
300 B
Go
20 lines
300 B
Go
// Package acl implements simple ACL manipulation via libacl.
|
|
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)
|
|
}
|