aboutsummaryrefslogtreecommitdiff
path: root/cmd/bolt/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/bolt/main.go')
-rw-r--r--cmd/bolt/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go
index 647c1c2..9a51ec5 100644
--- a/cmd/bolt/main.go
+++ b/cmd/bolt/main.go
@@ -66,7 +66,7 @@ func GetCommand(c *cli.Context) {
}
defer db.Close()
- err = db.With(func(tx *bolt.Tx) error {
+ err = db.View(func(tx *bolt.Tx) error {
// Find bucket.
b := tx.Bucket(name)
if b == nil {
@@ -105,7 +105,7 @@ func SetCommand(c *cli.Context) {
}
defer db.Close()
- err = db.Do(func(tx *bolt.Tx) error {
+ err = db.Update(func(tx *bolt.Tx) error {
// Find bucket.
b := tx.Bucket(name)
if b == nil {
@@ -137,7 +137,7 @@ func KeysCommand(c *cli.Context) {
}
defer db.Close()
- err = db.With(func(tx *bolt.Tx) error {
+ err = db.View(func(tx *bolt.Tx) error {
// Find bucket.
b := tx.Bucket(name)
if b == nil {
@@ -172,7 +172,7 @@ func BucketsCommand(c *cli.Context) {
}
defer db.Close()
- err = db.With(func(tx *bolt.Tx) error {
+ err = db.View(func(tx *bolt.Tx) error {
for _, b := range tx.Buckets() {
println(b.Name())
}
@@ -202,7 +202,7 @@ func PagesCommand(c *cli.Context) {
println("ID TYPE ITEMS OVRFLW")
println("======== ========== ====== ======")
- db.Do(func(tx *bolt.Tx) error {
+ db.Update(func(tx *bolt.Tx) error {
var id int
for {
p, err := tx.Page(id)