Documentation ¶
Index ¶
- Variables
- 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 JSONEngine
- type Predicate
Constants ¶
This section is empty.
Variables ¶
View Source
var JSON pJSON
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 ¶
type Callback[T comparable] func(value T, index int)
type JSONEngine ¶ added in v1.4.1
type JSONEngine interface { Decode(data []byte, v any) (err error) Encode(v any) (value []byte, err error) }
func NewJSON ¶ added in v1.4.0
func NewJSON(validatorTagName ...string) JSONEngine
type Predicate ¶
type Predicate[T comparable] func(value T) bool
Click to show internal directories.
Click to hide internal directories.