lotus/lib/must/must.go

10 lines
96 B
Go
Raw Permalink Normal View History

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