Recovery 中间件可以检测和捕获到web函数中的panic情况,并保证程序不会crash。此中间件为默认中间件,包含在Classic中。
t := tango.New(tango.Recovery(true)) t.Run()
其中的参数表示是否将崩溃的堆栈信息显示出来。
Deleting the wiki page 'ZH_Recovery' cannot be undone. Continue?