u

package
v0.9.25 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseOptimistic

func CloseOptimistic(resource io.Closer)

func GetInterfaceName added in v0.8.0

func GetInterfaceName[T any]() string

func JoinAsString

func JoinAsString[T any](arr []T, converter func(val T) string, sep string) string

func Must

func Must(err error)

func Must2

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

func Must3

func Must3[T1 any, T2 any](val1 T1, val2 T2, err error) (T1, T2)

func NewSpyWriter added in v0.7.13

func NewSpyWriter(writer io.Writer, spyWriter io.Writer) io.Writer

func Use

func Use[T io.Closer](resource T, block func(it T))

func WrapPanic

func WrapPanic[T any](block func() T, wrapperFunc func(reason any) any) T

Types

type ProxyWriter added in v0.7.13

type ProxyWriter struct {
	// contains filtered or unexported fields
}

func (ProxyWriter) Write added in v0.7.13

func (proxy ProxyWriter) Write(chunk []byte) (n int, err error)

Jump to

Keyboard shortcuts

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