aboutsummaryrefslogtreecommitdiff
path: root/internal/must/must.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/must/must.go')
-rw-r--r--internal/must/must.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/internal/must/must.go b/internal/must/must.go
deleted file mode 100644
index 7a137c6..0000000
--- a/internal/must/must.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// SPDX-FileCopyrightText: 2026 Stefan Majewsky <majewsky@gmx.net>
-// SPDX-License-Identifier: Apache-2.0
-
-package must
-
-import "testing"
-
-// Succeed fails the test if err is not nil.
-func Succeed(t testing.TB, err error) {
- t.Helper()
- if err != nil {
- t.Fatal(err.Error())
- }
-}
-
-// Return wraps a function returning two output values,
-// and either forwards the result value on success, or fails the test on error.
-func Return[V any](value V, err error) func(testing.TB) V {
- return func(t testing.TB) V {
- t.Helper()
- if err != nil {
- t.Fatal(err.Error())
- }
- return value
- }
-}