aboutsummaryrefslogtreecommitdiff
path: root/tx.go
diff options
context:
space:
mode:
Diffstat (limited to 'tx.go')
-rw-r--r--tx.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/tx.go b/tx.go
index c2dcbdc..123c490 100644
--- a/tx.go
+++ b/tx.go
@@ -73,3 +73,11 @@ func (tx *Tx) Assert(p bool) {
tx.Retry()
}
}
+
+func (tx *Tx) Return(v interface{}) {
+ panic(_return{v})
+}
+
+type _return struct {
+ value interface{}
+}