diff --git a/acl/aclbit.go b/acl/aclbit.go index 1366a50..9646b0a 100644 --- a/acl/aclbit.go +++ b/acl/aclbit.go @@ -60,6 +60,15 @@ func (a AclBit) Verify(n NumBit) bool { return false } +// verify mask return true or false +func (a AclBit) VerifyMask(mask AclBit) bool { + if (a & mask) > 0 { + return true + } + + return false +} + // verify or bit return true or false func (a AclBit) VerifyOr(n ...NumBit) bool { for _, n0 := range n { diff --git a/main.go b/main.go index a38b3e5..51e5275 100644 --- a/main.go +++ b/main.go @@ -50,4 +50,6 @@ func main() { } fmt.Println(ret) fmt.Println(acl.AllBit) + + fmt.Println(16 & 32) }