Skip to content

Commit

Permalink
cmd/bbolt: pagesCommand no need db.Update (#226)
Browse files Browse the repository at this point in the history
Co-authored-by: Tao Qingyun <taoqy@ls-a.me>
  • Loading branch information
qingyunha and taoqy committed Apr 24, 2021
1 parent 615d5f6 commit d043936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/bbolt/main.go
Expand Up @@ -882,7 +882,7 @@ func (cmd *PagesCommand) Run(args ...string) error {
fmt.Fprintln(cmd.Stdout, "ID TYPE ITEMS OVRFLW")
fmt.Fprintln(cmd.Stdout, "======== ========== ====== ======")

return db.Update(func(tx *bolt.Tx) error {
return db.View(func(tx *bolt.Tx) error {
var id int
for {
p, err := tx.Page(id)
Expand Down

0 comments on commit d043936

Please sign in to comment.