Добавление AllBit
This commit is contained in:
parent
8c25e5e228
commit
c584f650fa
@ -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
|
||||
|
12
main.go
12
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user