provide vendor dir for nix
This commit is contained in:
parent
003e12a3ef
commit
de13066a62
766 changed files with 339881 additions and 0 deletions
11
vendor/github.com/sourcegraph/conc/panics/try.go
generated
vendored
Normal file
11
vendor/github.com/sourcegraph/conc/panics/try.go
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
package panics
|
||||
|
||||
// Try executes f, catching and returning any panic it might spawn.
|
||||
//
|
||||
// The recovered panic can be propagated with panic(), or handled as a normal error with
|
||||
// (*panics.Recovered).AsError().
|
||||
func Try(f func()) *Recovered {
|
||||
var c Catcher
|
||||
c.Try(f)
|
||||
return c.Recovered()
|
||||
}
|
Reference in a new issue