Documentation ¶
Index ¶
- Variables
- func Get[T any](g Getter, key string) (value T, err error)
- func IsDir(file string) bool
- func IsFile(file string) bool
- func Join[T SetConstraint](entries []T, delim string) (value string, err error)
- func ParseJSON(data []byte, v any) (err error)
- func Path(paths ...string) string
- func PathFromExecutable(paths ...string) (file string, err error)
- func Split[T SetConstraint](data string, delim string) (value []T, err error)
- func ToJSON(v any) (value []byte, err error)
- func UUID() (value string, err error)
- type Array
- type ArrayCallback
- type ArrayPredicate
- type Getter
- type JSONEngine
- type PathFn
- type SetConstraint
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var JSON jsonEngine
Functions ¶
func Join ¶ added in v2.3.0
func Join[T SetConstraint](entries []T, delim string) (value string, err error)
func PathFromExecutable ¶ added in v2.4.0
Types ¶
type Array ¶
type Array[T comparable] interface { First() T Last() T At(i int) T Get(i int) T Take(i int) T Push(v ...T) int Pop() T Slice(start int, stop ...int) Array[T] Splice(offset int, length int, v ...T) Array[T] Contains(v T) bool IndexOf(v T) int Length() int Find(fn ArrayPredicate[T]) T Filter(fn ArrayPredicate[T]) []T ForEach(fn ArrayCallback[T]) }
func NewArray ¶
func NewArray[T comparable](data ...T) Array[T]
type ArrayCallback ¶
type ArrayCallback[T comparable] func(value T, index int)
type ArrayPredicate ¶
type ArrayPredicate[T comparable] func(value T) bool
type JSONEngine ¶
type JSONEngine interface { Decode(data []byte, v any) (err error) Encode(v any) (value []byte, err error) }
func NewJSON ¶
func NewJSON(validatorTagName ...string) JSONEngine
type SetConstraint ¶ added in v2.3.0
type SetConstraint interface { constraints.Integer | constraints.Float | ~string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.