IsBitSet checks if any of the populated bitsets contain the type, event ID, or category bit. This method evaluates first the event type bitset. The event type bitset should only be initialized if all event types pertain to the same category. Otherwise, event id bitset and last category bitset are te
(evt *Event)
| 82 | // Otherwise, event id bitset and last category bitset |
| 83 | // are tested for respective bits. |
| 84 | func (b *BitSets) IsBitSet(evt *Event) bool { |
| 85 | if b.types != nil && b.types.Test(uint(evt.Type.HookID())) { |
| 86 | return true |
| 87 | } |
| 88 | return (b.bitmask != nil && b.bitmask.IsSet(evt.Type.ID())) || |
| 89 | (b.cats != nil && b.cats.Test(uint(evt.Category.Index()))) |
| 90 | } |
| 91 | |
| 92 | // IsInitialized checks if the given bitset type is initialized. |
| 93 | func (b *BitSets) IsInitialized(bs BitSetType) bool { |