util

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyOf added in v0.0.3

func AnyOf[T any](objs ...T) (_ T, found bool)

AnyOf returns first non-nil object

func BytesToString added in v0.0.5

func BytesToString(b []byte) string

func IgnoreError added in v0.0.2

func IgnoreError[T any](obj T, err error) T

func MapsKeysSorted

func MapsKeysSorted[M ~map[K]V, K constraints.Ordered, V any](m M) []K

func MaybeCast

func MaybeCast[T any](obj any) T

func MaybeCastDefault

func MaybeCastDefault[T any](obj any, fallback T) T

func Must

func Must(err error)

func Must2

func Must2[T any](obj T, err error) T

func Must3

func Must3[T, U any](obj1 T, obj2 U, err error) (T, U)

func Must4

func Must4[T, U, V any](o1 T, o2 U, o3 V, err error) (T, U, V)

func Must5

func Must5[T, U, V, W any](o1 T, o2 U, o3 V, o4 W, err error) (T, U, V, W)

func PrintAt added in v0.0.3

func PrintAt(x, y uint, a ...any)

func Printf

func Printf(format string, a ...any)

func PrintfAt added in v0.0.2

func PrintfAt(x, y uint, format string, a ...any)

func Printfj

func Printfj(a ...any)

func Printfq

func Printfq(a ...any)

func PrintfqAt added in v0.0.2

func PrintfqAt(x, y uint, a ...any)

func Printfv

func Printfv(a ...any)

func PrintfvAt added in v0.0.2

func PrintfvAt(x, y uint, a ...any)

func Println

func Println(a ...any)

func StringToBytes added in v0.0.5

func StringToBytes(s string) []byte

func TryClose

func TryClose(obj any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL