From e195508015ee17ffc355f667e16e505547a7c45a Mon Sep 17 00:00:00 2001 From: Mitar Date: Sat, 6 Jan 2024 02:29:31 -0800 Subject: [PATCH] Show use of store.DefaultTxOptions. See https://github.com/codenotary/immudb/issues/1912. --- src/code-examples/go/embedded-kv-v1.5.0/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/code-examples/go/embedded-kv-v1.5.0/main.go b/src/code-examples/go/embedded-kv-v1.5.0/main.go index 47a98c831..ffd970d57 100644 --- a/src/code-examples/go/embedded-kv-v1.5.0/main.go +++ b/src/code-examples/go/embedded-kv-v1.5.0/main.go @@ -23,7 +23,7 @@ func main() { defer st.Close() // create a transaction - tx, err := st.NewTx(context.Background(), &store.TxOptions{Mode: store.ReadWriteTx}) + tx, err := st.NewTx(context.Background(), store.DefaultTxOptions().WithMode(store.ReadWriteTx)) handleErr(err) // ensure tx is closed (it won't affect committed tx)