Documentation ¶
Index ¶
- func Boolp(b bool) *bool
- func Bytep(b byte) *byte
- func DoBatchWork[T any](size int, items []T, f func(int, T))
- func Float32p(f float32) *float32
- func Float64p(f float64) *float64
- func Getenv(name, fallback string) string
- func Int16p(x int16) *int16
- func Int32p(x int32) *int32
- func Int64p(x int64) *int64
- func Int8p(x int8) *int8
- func Intp(x int) *int
- func Keys[T comparable, U any](m map[T]U) []T
- func MustEnv(varname string) string
- func MustExec(command string) string
- func MustExecArgs(command string, args ...string) string
- func MustExecArgsStdin(command string, args []string, r io.Reader) string
- func MustJson(x any, pretty ...bool) string
- func Runep(r rune) *rune
- func Sort[T constraints.Ordered](xs []T) []T
- func Stringp(s string) *string
- func Uint16p(x uint16) *uint16
- func Uint32p(x uint32) *uint32
- func Uint64p(x uint64) *uint64
- func Uint8p(x uint8) *uint8
- func Uintp(x uint) *uint
- type Map
- type OrderedJsonObj
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoBatchWork ¶
func Keys ¶
func Keys[T comparable, U any](m map[T]U) []T
func MustExecArgs ¶
func Sort ¶
func Sort[T constraints.Ordered](xs []T) []T
Types ¶
type OrderedJsonObj ¶
Marshals a JSON object using the given key order and values from a slice or map. The "Values" and "Map" fields are mutually exclusive.
func (OrderedJsonObj) MarshalJSON ¶
func (o OrderedJsonObj) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.