10 lines
96 B
Go
10 lines
96 B
Go
package must
|
|
|
|
func One[R any](r R, err error) R {
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
return r
|
|
}
|