Documentation
¶
Index ¶
- func Get[T any](g Getter, key string) (value T, err error)
- func ParseJSON(data []byte, v any) (err error)
- func ToJSON(v any) (value []byte, err error)
- type Array
- func (a *Array[T]) At(i int) T
- func (a *Array[T]) Contains(v T) bool
- func (a *Array[T]) Filter(fn Predicate[T]) []T
- func (a *Array[T]) Find(fn Predicate[T]) T
- func (a *Array[T]) First() T
- func (a *Array[T]) ForEach(fn Callback[T])
- func (a *Array[T]) Get(i int) T
- func (a *Array[T]) IndexOf(v T) int
- func (a *Array[T]) Last() T
- func (a *Array[T]) Length() int
- func (a *Array[T]) Pop() T
- func (a *Array[T]) Push(v ...T) int
- func (a *Array[T]) Slice(start int, stop ...int) *Array[T]
- func (a *Array[T]) Splice(offset int, length int, v ...T) *Array[T]
- func (a *Array[T]) Take(i int) T
- type Callback
- type Getter
- type Predicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Array ¶
type Array[T comparable] struct { // contains filtered or unexported fields }
func NewArray ¶
func NewArray[T comparable](data ...T) *Array[T]
type Callback ¶ added in v1.2.0
type Callback[T comparable] func(value T, index int)
type Predicate ¶ added in v1.2.0
type Predicate[T comparable] func(value T) bool
Click to show internal directories.
Click to hide internal directories.