codegen: move generated test helpers to new 'db_test.go' file
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package flowutils
|
||||
|
||||
import "io"
|
||||
|
||||
func PanicIf(err error) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -10,3 +12,7 @@ func Must[T any](val T, err error) T {
|
||||
PanicIf(err)
|
||||
return val
|
||||
}
|
||||
|
||||
func MustClose(closer io.Closer) {
|
||||
PanicIf(closer.Close())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user