>>105956953 (OP) > guy who’s never seen C code and never debugged anything
Some people use Must() to strip out the error, or write a Check() to check it instead of the if.
I’ve returned an invalid unicode word as an “out-of-band” error before on string results.
>>105959654
I have written my own Must. How does Check work?
My must is written like this:
func Must[T any](t T, err error) T {
if err != nil {
panic(err)
}
return t
}