Documentation
¶
Index ¶
- func AppendOf[T any](v T, vv ...T) []T
- func Call[T any](fn func() T) T
- func Contains[T comparable](vs []T, e T) bool
- func Delete[T comparable](set []T, value T) []T
- func DeleteAll[T comparable](set []T, value T) []T
- func DoFunc[T any](fn func() T) T
- func DoSelf[T any](t T, fn func(t T)) T
- func Equals[T comparable](a, b T) bool
- func Filter[T any](set []T, checkTrue func(T) bool) []T
- func FromPtr[T any](v *T) (r T)
- func IsNil(err any) bool
- func Last[T any](args []T) (t T)
- func ListOf[T any](args ...T) []T
- func Map[T, V any](data []T, handle func(d T) V) []V
- func Max[T cmp.Ordered](a, b T) (r T)
- func Min[T cmp.Ordered](a, b T) (r T)
- func Nil[T any]() (t *T)
- func ReleaseVersion() string
- func Ternary[T any](ok bool, a, b T) T
- func TernaryFn[T any](ok bool, a, b func() T) T
- func ToPtr[T any](v T) *T
- func Zero[T any]() (ret T)
- type Ctx
- type KV
- type List
- type Tuple
- type Void
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](vs []T, e T) bool
Contains returns whether `vs` contains the element `e` by comparing vs[i] == e.
func Delete ¶
func Delete[T comparable](set []T, value T) []T
Delete the first occurrence of a type from a set.
func DeleteAll ¶
func DeleteAll[T comparable](set []T, value T) []T
DeleteAll occurrences from a set.
func Equals ¶
func Equals[T comparable](a, b T) bool
Equals wraps the '==' operator for comparable types.
func Filter ¶
Filter iterates over `set` and gets the values that match `criteria`.
Filter will return a new allocated slice.
func ReleaseVersion ¶
func ReleaseVersion() string
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmds
|
|
|
protoc-gen-go-cloudevent2
command
|
|
|
protoc-gen-go-enum2
command
|
|
|
protoc-gen-go-errors2
command
|
|
|
protoc-gen-go-sql2
command
|
|
|
testmain
command
|
|
|
component
|
|
|
errcode
Package errcode provides error code handling with gRPC compatibility.
|
Package errcode provides error code handling with gRPC compatibility. |
|
example
command
main.go
|
main.go |
|
graph
|
|
|
internal
|
|
|
example/errors
command
|
|
|
example/js
command
|
|
|
example/log
command
|
|
|
platform
|
|
|
proto
|
|
|
testcodepb
Code generated by protoc-gen-deepcopy.
|
Code generated by protoc-gen-deepcopy. |
|
Package syncutil Package buffer provides an implementation of an unbounded buffer.
|
Package syncutil Package buffer provides an implementation of an unbounded buffer. |
Click to show internal directories.
Click to hide internal directories.