Documentation
¶
Overview ¶
package bitflag provides simple bit flag setting, checking, and clearing methods that take bit position args as ints (from const int eunum iota's) and do the bit shifting from there -- although a tiny bit slower, the convenience of maintaining ordinal lists of bit positions greatly outweighs that cost -- see kit type registry for further enum management functions
Index ¶
- func Clear(bits *int64, flags ...int)
- func Clear32(bits *int32, flags ...int)
- func ClearMask(bits *int64, mask int64)
- func ClearMask32(bits *int32, mask int32)
- func Has(bits int64, flag int) bool
- func Has32(bits int32, flag int) bool
- func HasAll(bits int64, flags ...int) bool
- func HasAll32(bits int32, flags ...int) bool
- func HasAny(bits int64, flags ...int) bool
- func HasAny32(bits int32, flags ...int) bool
- func HasMask(bits, mask int64) bool
- func HasMask32(bits, mask int32) bool
- func Mask(flags ...int) int64
- func Mask32(flags ...int) int32
- func Set(bits *int64, flags ...int)
- func Set32(bits *int32, flags ...int)
- func SetState(bits *int64, state bool, flags ...int)
- func SetState32(bits *int32, state bool, flags ...int)
- func Toggle(bits *int64, flags ...int)
- func Toggle32(bits *int32, flags ...int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetState ¶
set or clear bit value(s) depending on state (on / off) for ordinal bit position flags
func SetState32 ¶
set or clear bit value(s) depending on state (on / off) for ordinal bit position flags
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.