Documentation ¶
Index ¶
- func Call(f func())
- func CallWithHandler(f func(), errHandler func(err error))
- func IfErr(err error)
- func WithErr(err error)
- type BitSet
- func (b *BitSet) Clear(index int)
- func (b *BitSet) ClearRange(start, end int)
- func (b *BitSet) Clone() *BitSet
- func (b *BitSet) Copy(other *BitSet)
- func (b *BitSet) Count() int
- func (b *BitSet) Data() []uint64
- func (b *BitSet) EnsureCapacity(words int)
- func (b *BitSet) Equal(other *BitSet) bool
- func (b *BitSet) FirstSet() int
- func (b *BitSet) Flip(index int)
- func (b *BitSet) FlipRange(start, end int)
- func (b *BitSet) LastSet() int
- func (b *BitSet) Load(data []uint64)
- func (b *BitSet) NextClear(start int) int
- func (b *BitSet) NextSet(start int) int
- func (b *BitSet) PreviousClear(start int) int
- func (b *BitSet) PreviousSet(start int) int
- func (b *BitSet) Reset()
- func (b *BitSet) Set(index int)
- func (b *BitSet) SetRange(start, end int)
- func (b *BitSet) State(index int) bool
- func (b *BitSet) Trim()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(f func())
Call the provided function, safely wrapped in a errs.Recovery() handler that logs any errors via slog.
func CallWithHandler ¶
func CallWithHandler(f func(), errHandler func(err error))
CallWithHandler calls the provided function, safely wrapped in a errs.Recovery() handler.
Types ¶
type BitSet ¶
type BitSet struct {
// contains filtered or unexported fields
}
BitSet contains a set of bits.
func (*BitSet) ClearRange ¶
ClearRange clears the bits from 'start' to 'end', inclusive.
func (*BitSet) EnsureCapacity ¶
EnsureCapacity ensures that the BitSet has enough underlying storage to accommodate setting a bit as high as index position 'words' x 64 - 1 without needing to allocate more storage.
func (*BitSet) FirstSet ¶
FirstSet returns the first set bit. If no bits are set, then -1 is returned.
func (*BitSet) NextSet ¶
NextSet returns the next set bit starting from 'start'. If no bits are set at or beyond 'start', then -1 is returned.
func (*BitSet) PreviousClear ¶
PreviousClear returns the previous clear bit starting from 'start'. If no bits are clear at or before 'start', then -1 is returned.
func (*BitSet) PreviousSet ¶
PreviousSet returns the previous set bit starting from 'start'. If no bits are set at or before 'start', then -1 is returned.
Directories ¶
Path | Synopsis |
---|---|
Package desktop provides desktop integration utilities.
|
Package desktop provides desktop integration utilities. |
Package errs implements a detailed error object that provides stack traces with source locations, along with nested causes, if any.
|
Package errs implements a detailed error object that provides stack traces with source locations, along with nested causes, if any. |
Package taskqueue provides a simple asynchronous task queue.
|
Package taskqueue provides a simple asynchronous task queue. |
Package txt provides various text utilities.
|
Package txt provides various text utilities. |