This commit is contained in:
parent
87f5471b76
commit
c402c775a3
12
pkg/flowutils/flowutils.go
Normal file
12
pkg/flowutils/flowutils.go
Normal file
@ -0,0 +1,12 @@
|
||||
package flowutils
|
||||
|
||||
func PanicIf(err error) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func Must[T any](val T, err error) T {
|
||||
PanicIf(err)
|
||||
return val
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user