Documentation
¶
Index ¶
- func BatchOrFail[T any](size uint32, in iter.Seq2[T, error]) iter.Seq2[[]T, error]
- func Collect[T any](in iter.Seq[T]) []T
- func CollectOrFail[T any](in iter.Seq2[T, error]) ([]T, error)
- func DoIfFalse(assertToBeTrue *bool, otherwise func())
- func IgnoreCloseError(when io.Closer)
- func IgnoreCloseErrorIfFalse(assertToBeTrue *bool, otherwise io.Closer)
- func IgnoreError(when func() error)
- func IgnoreErrorIfFalse(assertToBeTrue *bool, otherwise func() error)
- func JoinSeq[T any](seqs ...iter.Seq[T]) iter.Seq[T]
- func JoinSeq2[K any, V any](seqs ...iter.Seq2[K, V]) iter.Seq2[K, V]
- func KeepCloseError(target *error, when io.Closer)
- func KeepError(target *error, when func() error)
- func MapSlice[I any, O any](in []I, mapper func(I) O) []O
- func MapSliceErr[I any, O any](in []I, mapper func(I) (O, error)) ([]O, error)
- func Must(v error, msgAndArgs ...any)
- func MustNotNil(v any, msgAndArgs ...any)
- func P[T any](a T) *T
- func Seq2ErrOf[T any](ts ...T) iter.Seq2[T, error]
- func Seq2Of[K any, V any](kvs ...KV[K, V]) iter.Seq2[K, V]
- func SeqOf[T any](ts ...T) iter.Seq[T]
- func SingleSeq2Of[K any, V any](k K, v V) iter.Seq2[K, V]
- func SingleSeqOf[T any](t T) iter.Seq[T]
- func Sleep(ctx context.Context, duration time.Duration) error
- func SleepSilently(ctx context.Context, duration time.Duration)
- func ToDebugString(formatted bool, what any) string
- type Duration
- func (this Duration) IsEqualTo(other any) bool
- func (this Duration) IsZero() bool
- func (this Duration) MarshalText() (text []byte, err error)
- func (this *Duration) Native() time.Duration
- func (this *Duration) Set(text string) error
- func (this *Duration) SetNative(v time.Duration)
- func (this Duration) String() string
- func (this *Duration) UnmarshalText(text []byte) error
- func (this *Duration) Validate() error
- type KV
- type KeyedMutex
- type Regexp
- func (this Regexp) IsEqualTo(other any) bool
- func (this Regexp) IsZero() bool
- func (this Regexp) MarshalText() (text []byte, err error)
- func (this *Regexp) MatchString(s string) bool
- func (this *Regexp) Set(text string) error
- func (this Regexp) String() string
- func (this *Regexp) UnmarshalText(text []byte) error
- func (this Regexp) Validate() error
- type StructuredKey
- type Unlocker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchOrFail ¶ added in v0.4.0
func IgnoreCloseError ¶
func IgnoreCloseErrorIfFalse ¶ added in v0.3.0
func IgnoreError ¶
func IgnoreError(when func() error)
func IgnoreErrorIfFalse ¶ added in v0.3.0
func KeepCloseError ¶
func MustNotNil ¶
func SingleSeqOf ¶ added in v0.3.0
func SleepSilently ¶ added in v0.5.8
func ToDebugString ¶
Types ¶
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
func DurationOf ¶
func MustNewDuration ¶
func NewDuration ¶
func (Duration) MarshalText ¶
func (*Duration) UnmarshalText ¶
type KeyedMutex ¶ added in v0.4.0
type KeyedMutex[K comparable] struct { // contains filtered or unexported fields }
func (*KeyedMutex[K]) Lock ¶ added in v0.4.0
func (this *KeyedMutex[K]) Lock(key K) Unlocker
func (*KeyedMutex[K]) RLock ¶ added in v0.4.0
func (this *KeyedMutex[K]) RLock(key K) Unlocker
type Regexp ¶
type Regexp struct {
// contains filtered or unexported fields
}
func MustNewRegexp ¶
func (Regexp) MarshalText ¶
func (*Regexp) MatchString ¶
func (*Regexp) UnmarshalText ¶
type StructuredKey ¶
type StructuredKey []string
func StructuredKeyOf ¶
func StructuredKeyOf(args ...string) StructuredKey
func (StructuredKey) Child ¶
func (this StructuredKey) Child(key string) StructuredKey
func (StructuredKey) Index ¶
func (this StructuredKey) Index(i int) StructuredKey
func (StructuredKey) String ¶
func (this StructuredKey) String() string
Click to show internal directories.
Click to hide internal directories.