mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 09:57:51 +08:00
8 lines
100 B
Go
8 lines
100 B
Go
package testutil
|
|
|
|
func Recover(f func()) (r any) {
|
|
defer func() { r = recover() }()
|
|
f()
|
|
return
|
|
}
|