diff --git a/acl/aclbit.go b/acl/aclbit.go index 9646b0a..0faa7ea 100644 --- a/acl/aclbit.go +++ b/acl/aclbit.go @@ -69,6 +69,17 @@ func (a AclBit) VerifyMask(mask AclBit) bool { return false } +// parsing AlcBit to array NumBit +func (a AclBit) Parse() []NumBit { + var n []NumBit + for i := 0; i < 63; i++ { + if a.Verify(NumBit(i)) { + n = append(n, NumBit(i)) + } + } + return n +} + // verify or bit return true or false func (a AclBit) VerifyOr(n ...NumBit) bool { for _, n0 := range n {