mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 16:43:00 -06:00
[chore] update viper version (#2539)
* update viper version * removes our last uses of the slice package * fix tests
This commit is contained in:
parent
c5eced5fd1
commit
906639ad7e
166 changed files with 11771 additions and 2782 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()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue