diff --git a/acl/aclbit.go b/acl/aclbit.go index b2c1abd..1366a50 100644 --- a/acl/aclbit.go +++ b/acl/aclbit.go @@ -8,6 +8,10 @@ import ( type NumBit int64 type AclBit int64 +const ( + AllBit AclBit = 9223372036854775807 +) + // New AclBit func New(n ...NumBit) AclBit { var i64 AclBit diff --git a/main.go b/main.go index 1c8abc8..a38b3e5 100644 --- a/main.go +++ b/main.go @@ -37,5 +37,17 @@ func main() { fmt.Println(a.Verify(62)) a.SetFalse(62) fmt.Println(a.Verify(62)) + + a.SetTrue(63) fmt.Println(a.Verify(63)) + a.SetFalse(63) + fmt.Println(a.Verify(63)) + + var ret acl.AclBit + var i acl.NumBit + for i = 0; i < 63; i++ { + ret.SetTrue(i) + } + fmt.Println(ret) + fmt.Println(acl.AllBit) }