Documentation ¶
Index ¶
- Constants
- func All[T any](array []T, block func(it T) bool) bool
- func AllIndexed[T any](array []T, block func(index int, it T) bool) bool
- func Any[T any](array []T, block func(it T) bool) bool
- func AnyError(errs ...error) errordeprecated
- func AnyIndexed[T any](array []T, block func(index int, it T) bool) bool
- func Cast[T any](obj any) (T, bool)
- func Close(closers ...any) error
- func Closer(closer func() error) io.Closer
- func Contains[T comparable](arr []T, target T) bool
- func DefaultValue[T any]() T
- func Done(ctx context.Context) bool
- func Dup[T any](obj T) T
- func Error(_ any, err error) error
- func Filter[T any](arr []T, block func(it T) bool) []T
- func FilterIndexed[T any](arr []T, block func(index int, it T) bool) []T
- func FilterIsInstance[T any, N any](arr []T, block func(it T) (N, bool)) []N
- func FilterNotDefault[T comparable](arr []T) []T
- func FilterNotNil[T any](arr []T) []T
- func Find[T any](arr []T, block func(it T) bool) T
- func FlatMap[T any, N any](arr []T, block func(it T) []N) []N
- func FlatMapIndexed[T any, N any](arr []T, block func(index int, it T) []N) []N
- func IsEmpty[T comparable](obj T) bool
- func KeepAlive(obj any)
- func Map[T any, N any](arr []T, block func(it T) N) []N
- func MapIndexed[T any, N any](arr []T, block func(index int, it T) N) []N
- func MaxBy[T any, C constraints.Ordered](arr []T, block func(it T) C) T
- func MinBy[T any, C constraints.Ordered](arr []T, block func(it T) C) T
- func Must(errs ...error)
- func Must1(_ any, err error)
- func Must2(_, _ any, err error)
- func MustCast[T any](obj any) T
- func PtrOrNil[T any](ptr *T) any
- func PtrValueOrDefault[T any](ptr *T) T
- func Reverse[T any](arr []T) []T
- func SortBy[T any, C constraints.Ordered](arr []T, block func(it T) C)
- func Start(starters ...any) error
- func SubstringAfter(s string, substr string) string
- func SubstringAfterLast(s string, substr string) string
- func SubstringBefore(s string, substr string) string
- func SubstringBeforeLast(s string, substr string) string
- func SubstringBetween(s string, after string, before string) string
- func Uniq[T comparable](arr []T) []T
- func UniqBy[T any, C comparable](arr []T, block func(it T) C) []T
- type Shell
- type Starter
- type WithUpstream
Constants ¶
View Source
const UnsafeBuffer = runtime.GOOS != "windows"
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](arr []T, target T) bool
func DefaultValue ¶
func DefaultValue[T any]() T
func FilterIndexed ¶
func FilterIsInstance ¶
func FilterNotDefault ¶
func FilterNotDefault[T comparable](arr []T) []T
func FilterNotNil ¶
func FilterNotNil[T any](arr []T) []T
func FlatMapIndexed ¶
func IsEmpty ¶
func IsEmpty[T comparable](obj T) bool
func MapIndexed ¶
func MaxBy ¶
func MaxBy[T any, C constraints.Ordered](arr []T, block func(it T) C) T
func MinBy ¶
func MinBy[T any, C constraints.Ordered](arr []T, block func(it T) C) T
func PtrValueOrDefault ¶
func PtrValueOrDefault[T any](ptr *T) T
func SortBy ¶
func SortBy[T any, C constraints.Ordered](arr []T, block func(it T) C)
func SubstringAfter ¶
func SubstringAfterLast ¶
func SubstringBefore ¶
func SubstringBeforeLast ¶
func Uniq ¶
func Uniq[T comparable](arr []T) []T
func UniqBy ¶
func UniqBy[T any, C comparable](arr []T, block func(it T) C) []T
Types ¶
type WithUpstream ¶
type WithUpstream interface {
Upstream() any
}
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
x
|
|
constraints
Package constraints defines a set of useful constraints to be used with type parameters.
|
Package constraints defines a set of useful constraints to be used with type parameters. |
list
Package list implements a doubly linked list.
|
Package list implements a doubly linked list. |
Click to show internal directories.
Click to hide internal directories.