Documentation ¶
Index ¶
- Constants
- Variables
- func AssertErr(err error)
- func AssertErrf(err error, format string, args ...any)
- func Assertf(condition bool, format string, args ...any)
- func Doc(text string) string
- func DocFmt(text string, args ...any) string
- func Docf(format string, args ...any) string
- func ErrFull(err error) string
- func Errf(format string, args ...any) error
- func Filter[T any](slice []T, fn func(T) bool) []T
- func FirstNonZero[T comparable](values ...T) T
- func Group[T any, Q comparable](slice []T, fn func(T) Q) [][]T
- func HomeDir() string
- func If[T any](cond bool, then, else_ T) T
- func IgnoreErr(_ error)
- func Indent(text string, indent string)
- func IsTerminal(file *os.File) bool
- func Logf(ctx context.Context, level int, format string, args ...any)
- func Map[T any, Q any](slice []T, f func(T) Q) []Q
- func Panicf(format string, args ...any)
- func Prepend[T any](slice []T, elems ...T) []T
- func TerminalWidth(file *os.File) int
- func WrapExtendf(err error, format string, args ...any) error
- func Wrapf(err error, format string, args ...any) error
- type Logger
- type Slice
Constants ¶
View Source
const ( Fatal = iota Error Warning Info Debug Trace )
Variables ¶
View Source
var ( ErrEris = &errEris{} ErrEmperror = &errEmperror{} ErrErrorx = &errErrorx{} )
View Source
var Empty = &api.Empty{}
View Source
var Level = Info
Functions ¶
func AssertErrf ¶
func FirstNonZero ¶
func FirstNonZero[T comparable](values ...T) T
func Group ¶
func Group[T any, Q comparable](slice []T, fn func(T) Q) [][]T
func IsTerminal ¶
func TerminalWidth ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.