lotus/lib/must/must.go
2023-02-06 14:38:48 +01:00

10 lines
96 B
Go

package must
func One[R any](r R, err error) R {
if err != nil {
panic(err)
}
return r
}