policy/main.go
Anatoly Prohacky 45786d84a2 change v0.0.3
2023-03-04 19:03:57 +10:00

42 lines
811 B
Go

package main
import (
"fmt"
"gitstore.ru/tolikproh/policy/acl"
)
func main() {
a := acl.New(0, 1, 2, 3, 4, 32, 60, 61, 62, 63)
fmt.Println(a)
fmt.Println(a.String())
fmt.Println(a.Int64())
b := fmt.Sprintf("%b", a)
fmt.Println(b)
fmt.Println(a.Verify(0))
a.SetFalse(0)
fmt.Println(a.Verify(0))
fmt.Println(a.Verify(1))
a.SetFalse(1)
fmt.Println(a.Verify(1))
fmt.Println(a.Verify(2))
a.SetFalse(2)
fmt.Println(a.Verify(2))
fmt.Println(a.Verify(3))
a.SetFalse(3)
fmt.Println(a.Verify(3))
fmt.Println(a.Verify(4))
a.SetFalse(4)
fmt.Println(a.Verify(4))
fmt.Println(a.Verify(5))
a.SetTrue(5)
fmt.Println(a.Verify(5))
fmt.Println(a.Verify(32))
a.SetFalse(32)
fmt.Println(a.Verify(32))
fmt.Println(a.Verify(62))
a.SetFalse(62)
fmt.Println(a.Verify(62))
fmt.Println(a.Verify(63))
}