Must2 panics if the second parameter is not nil, otherwise returns the first parameter.
(v interface{}, err error)
| 29 | |
| 30 | // Must2 panics if the second parameter is not nil, otherwise returns the first parameter. |
| 31 | func Must2(v interface{}, err error) interface{} { |
| 32 | Must(err) |
| 33 | return v |
| 34 | } |
| 35 | |
| 36 | // Error2 returns the err from the 2nd parameter. |
| 37 | func Error2(v interface{}, err error) error { |