added flags operations

This commit is contained in:
2024-11-26 06:02:12 +02:00
parent 2d725be6a5
commit e9268f0c1f
2 changed files with 26 additions and 0 deletions

View File

@@ -703,3 +703,15 @@ func TestVarSize(t *testing.T) {
buf.Reset()
}
}
// func TestSetUnsetFlag(t *testing.T) {
// var (
// flag byte = 2
// flags byte = flag
// )
// flags &= ^flag
// fmt.Printf("%b\n", ^flag)
// fmt.Printf("%b\n", UnsetFlag(flags, flag))
// }