mirror of
https://github.com/versia-pub/versia-go.git
synced 2026-03-13 04:29:15 +01:00
fix: tests
This commit is contained in:
parent
62a1a1ff83
commit
3f8ac13289
6 changed files with 59 additions and 51 deletions
10
pkg/versia/utils/fns.go
Normal file
10
pkg/versia/utils/fns.go
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package versiautils
|
||||
|
||||
func Must[In any, Out any](fn func(In) (Out, error), v In) Out {
|
||||
out, err := fn(v)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue