aboutsummaryrefslogtreecommitdiff
path: root/tx.go
diff options
context:
space:
mode:
authorMatt Joiner <anacrolix@gmail.com>2019-11-07 09:48:53 +1100
committerMatt Joiner <anacrolix@gmail.com>2019-11-07 09:48:53 +1100
commitc62003433a6ddee1bf55092f34a4aa12cf4d7160 (patch)
tree821a97a053086f57691b97eb97cc02c324a1009c /tx.go
parentMake returns explicit (diff)
downloadstm-c62003433a6ddee1bf55092f34a4aa12cf4d7160.tar.gz
stm-c62003433a6ddee1bf55092f34a4aa12cf4d7160.tar.xz
Add Tx.String
Diffstat (limited to 'tx.go')
-rw-r--r--tx.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tx.go b/tx.go
index 14003f8..e90eb57 100644
--- a/tx.go
+++ b/tx.go
@@ -1,6 +1,7 @@
package stm
import (
+ "fmt"
"sort"
"sync"
"unsafe"
@@ -141,3 +142,7 @@ func (tx *Tx) unlock() {
l.Unlock()
}
}
+
+func (tx *Tx) String() string {
+ return fmt.Sprintf("%[1]T %[1]p", tx)
+}