Parsing Acl to Numbit
This commit is contained in:
parent
1c01e2dc29
commit
07f03e70e1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user