must

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 0 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must[T interface{}](res T, err error) T

Must 包装2个返回值的函数返回值,当 err 为非 nil 的时候自动触发 panic

func Must2

func Must2[T interface{}, M interface{}](r1 T, r2 M, err error) (T, M)

Must 包装2个返回值的函数返回值,当 err 为非 nil 的时候自动触发 panic

func NoError

func NoError(err error)

NoError 包装一个返回值为 error 的函数,当 err 为非 nil 的时候自动触发 panic

Types

This section is empty.

Jump to

Keyboard shortcuts

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