mirror of
https://github.com/go-gst/go-gst.git
synced 2025-09-28 12:52:13 +08:00

this example has an assert that checks wether or nor the finalizers ran correctly. If they don't then a mem leak will happen
10 lines
122 B
Go
10 lines
122 B
Go
package common
|
|
|
|
func Must[T any](v T, err error) T {
|
|
if err != nil {
|
|
panic("got error:" + err.Error())
|
|
}
|
|
|
|
return v
|
|
}
|