package
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: Feb 27, 2023
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 9
Opens a new window with list of known importers.
Documentation
¶
func Must[T interface{}](res T, err error) T
Must 包装2个返回值的函数返回值,当 err 为非 nil 的时候自动触发 panic
func Must2[T interface{}, M interface{}](r1 T, r2 M, err error) (T, M)
Must 包装2个返回值的函数返回值,当 err 为非 nil 的时候自动触发 panic
NoError 包装一个返回值为 error 的函数,当 err 为非 nil 的时候自动触发 panic
Source Files
¶
Click to show internal directories.
Click to hide internal directories.